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