给定两个list A ,B,请用找出 A ,B中相同的元素,A ,B中不同的元素 ??

A、B 中相同元素:print(set(A)&set(B))
A、B 中不同元素:print(set(A)^set(B))

原文地址:https://www.cnblogs.com/lmh001/p/9740359.html