# 交集
print(set(newList).intersection(set(oldlist)))
# 差集
print(list(set(newList).difference(set(oldlist))))
python 数组取交集和差集
阅读 38
2023-03-10
# 交集
print(set(newList).intersection(set(oldlist)))
# 差集
print(list(set(newList).difference(set(oldlist))))
相关推荐
精彩评论(0)