I have two lists,
l1 = [1,4,3,2,5]
l2 = [4,3,2,10]
Now I want to find the common element between to lists so I am using following code,
list(set(l1).intersection(set(l2)))
>> [2, 3, 4]
But its changing the sequence of the l1
, I don't want to change the sequence so the result should be ,
>> [4, 3, 2]
Looking for the fastest way to do this without changing the sequence ?