1,使用set函数,set(list)
2,使用字典函数,
>>>a=[1,2,4,2,4,5,6,5,7,8,9,0] >>> b={} >>>b=b.fromkeys(a) >>>c=list(b.keys()) >>> c