Symmetric difference finds elements in either set but not both:
a = {1, 2, 3}
b = {2, 3, 4}
exclusive = a ^ b # {1, 4}
exclusive = a.symmetric_difference(b) # Same result
This is like union minus intersection. Elements that appear in exactly one set, not both.
Symmetric difference is order-independent: a ^ b equals b ^ a.