📜  相交集 python - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:22.631000             🧑  作者: Mango

代码示例2
both = {'a', 'A', 'b', 'B'}
some = {'a', 'b', 'c'}
result1 = both & some
# result: {'a', 'b'}
result2 = both.intersection(some)

print(result1 == result2)
# True