获取两个列表中的交集 可以使用set集合的intersection方法 例: a = [1,2,3] b = [3,4,5,6,2] common = set(a).intersection.(set(b)) print(list(common)) 输出:[2,3]