代码示例:(标识:python_set_update_2)
python_set_update_2.py
set1 = {"a", "b" , "c"}
set2 = {1, 2, 3}

set1.update(set2)
print(set1)
运行结果: