Open this example in the interactive library
Source code
print(sorted({1, 2, 3} ^ {2, 3, 4}))Sample output
[1, 4]

Find a symmetric difference. A self-contained example using the Python standard library.
Open this example in the interactive library
print(sorted({1, 2, 3} ^ {2, 3, 4}))[1, 4]