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.

b = {}
b = b.fromkeys(list)
print b.keys()

 4.set(list)

  

 

相关文章:

  • 2022-12-23
  • 2021-12-16
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-12-02
  • 2022-01-24
猜你喜欢
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案