list = [1,1,3,4,6,3,7]
1.
for s in list:
if list.count(s) >1:
list.remove(s)
2.
list2=[]
for s in list:
if s not in list2:
list2.append(s)
print list2
3.
list2=[]
for s in list:
list2.append(s)
print list2
python 删除list中重复元素,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/huangxiaohen/p/3834086.html