# find the common elements in the list. l1 = ['a','b','c','d','e','f','g','h','a','b'] l2 = ['e','f','g','h','i','j'] s1=set(l1).intersection(l2) print(list(s1)) #['g', 'f', 'e', 'h']