Concise a for loop (x for x in …) in python

前端 未结 0 908
耶瑟儿~
耶瑟儿~ 2020-12-05 12:05

I am trying to concise the following simple loop

a = [1,2,3,2,1,5,6,5,5,5]
for x in set(a):
    a.remove(x)

This is working well but I need t

相关标签:
回答
  • 消灭零回复
提交回复
热议问题