Find non-common elements in lists

Use the symmetric difference operator for sets (aka the XOR operator):

>>> set([1,2,3]) ^ set([3,4,5])
set([1, 2, 4, 5])

Leave a Comment