Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # remove_duplicates_in_order.py
- mylist = [1,2,9,9,2,5,4,9,3]
- mynewlistA = list(set(mylist))
- print mynewlistA
- mynewlistB = sorted(set(mylist), key=lambda x: mylist.index(x))
- print mynewlistB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement