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

set3 = set1.union(set2)
print(set3)
运行结果: