主页
Python
Python - 添加集合项
demo_sets_update2
运行 ❯
×
更改方向
保存代码
更改主题
thisset = {"apple", "banana", "cherry"} mylist = ["kiwi", "orange"] thisset.update(mylist) print(thisset)
{'banana', 'cherry', 'apple', 'orange', 'kiwi'}