📜  交叉点 python - TypeScript 代码示例

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

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

print(result1 == result2)
# True