To make a new list retaining the order of first elements of duplicates in L
newlist=[ii for n,ii in enumerate(L) if ii not in L[:n]]
for example if L=[1, 2, 2, 3, 4, 2, 4, 3, 5]
then newlist
will be [1,2,3,4,5]
This checks each new element has not appeared previously in the list before adding it. Also it does not need imports.