So I know how to find the intersection of two lists by doing:
>>> a = [1,2,3,4,5] >>> b = [1,3,5,6] >>> list(set(a) & set(b))
Symmetric difference?
>>> set(a).symmetric_difference(b) {2, 4, 6}
I usually prefer a shortcut:
set(a) ^ set(b) {2, 4, 6}