1)set()函数去重
list1=[1,2,3,2,4,3,5,4,2,2,5,6]
list2=list(set(list1))
print(list2)
2)利用for循环
list3=[1,2,3,4,3,2,3,4,5,9]
for i in list3:
if list3.count(i)>1:
list3.remove(1)
print(i)
3)利用列表循环判断是否重复
list4=[1,2,3,2,5,4,6]
ww=[]
for i in list4:
if i not in ww:
ww.appence(ww)
print(ww)