代码示例:(标识:python_set_update_1)
python_set_update_1.py
thisset = {"apple", "banana", "cherry"}

thisset.update(["orange", "mango", "grapes"])

print(thisset)
运行结果: