从列表中删除重复元素

a=list(set([4, 4, 5, 5, 6]))
print(a)

打印结果:
(AI) PS C:\Users\SSYP\Desktop\socket\Socket_example> python test.py
[4, 5, 6]


 

おすすめ

転載: blog.csdn.net/weixin_43332715/article/details/121112500