# 交集 print(set(newList).intersection(set(oldlist))) # 差集 print(list(set(newList).difference(set(oldlist))))