demo_ref_set_update.py:
x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} x.update(y) print(x)
➜ begtut>python demo_set_update.py
{'microsoft', 'cherry', 'apple', 'google', 'banana'}