#arr2

Python 数组 去掉arr2中 arr2与arr1重复的元素

#去掉arr2中arr2与arr1重复的元素arr1=['a','b','c']arr2=['a','e','f']foriteminarr2:ifiteminarr1:arr2.remove(item)print(arr2)#结果:['e','f'] ...