System version : Windows 10 64-bit Python version : Python 3.6.0 :: Anaconda 4.3.1 (64-bit)
list1=[1,2,4,3,1,2] list1_remove_duplicate = sorted(set(list1),key=list1.index) print(list1_remove_duplicate)
[1, 2, 4, 3]
沒有留言:
張貼留言