主页
Python
Python - 连接集合
demo_set_symmetric_difference_caret
运行 ❯
×
更改方向
保存代码
更改主题
set1 = {"apple", "banana", "cherry"} set2 = {"google", "microsoft", "apple"} set3 = set1 ^ set2 print(set3)
{'google', 'banana', 'microsoft', 'cherry'}