# difference between list 1 and list 2 list1 = [5,7,9,27,10,30,40,50,75,47,66,89,121,566,100] list2 = [5,7,9,27,10,30,40,75,66,89,121,566,100] list3 = set(list2) dif = [item for item in list1 if item not in list3] print(dif) # [50, 47]