2019年10月21日

python中剔除两个数组相同项

摘要: 方法一: 先得到交集,然后再处理。 两个一维数组: intersection=list(set(A).intersection(set(B))) for i in intersection: if i in B: B.remove(i) 由于set命令无法处理二维数组,所以可以自己写一个交集函数: 阅读全文

posted @ 2019-10-21 00:12 你若盛开,清风自来! 阅读(4878) 评论(0) 推荐(0) 编辑

导航