demo_ref_set_symmetric_difference_update.py:
x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} x.symmetric_difference_update(y) print(x)
➜ begtut>python demo_set_symmetric_difference_update.py
{'cherry', 'microsoft', 'google', 'banana'}