demo_ref_set_union.py:
x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} z = x.union(y) print(z)
➜ begtut>python demo_set_union.py
{'microsoft', 'cherry', 'apple', 'google', 'banana'}