Python 比较两个数组的元素的异同方法 通过set()获取两个数组的交/并/差集:printset(a).intersection(set(b))#交集printset(a).union(set(b))#并集 python比较两个数组元素