Get difference between two lists
To get elements which are in temp1 but not in temp2 : Beware that it is asymmetric : where you might expect/want it to equal set([1, 3]). If you do want set([1, 3]) as your answer, you can use set([1, 2]).symmetric_difference(set([2, 3])).