python中列表去重
转载自:https://blog.csdn.net/Jerry_1126/article/details/79843751
方法一: 使用内置set方法来去重
>>> lst1 = [2, 1, 3, 4, 1]
>>> lst2 = list(set(lst1))
>>> print(lst2)
[1, 2, 3, 4]
方法二: 使用字典...
转载
2019-07-02 18:53:41 ·
2260 阅读 ·
0 评论