Définir symétrique en utilisant la méthode de l'opérateur de différence symétrique (^)

# Set X
X = {1, 2, 3}

# Set Y
Y = {2, 3, 4}

# Set Z
Z = {2, 3, 4}

print(X^Y)
print(X^Z)
print(Y^Z)

# symmetric difference with self
print(X^X)
print(Y^Y)
Outrageous Ostrich