# for example
raw_list = [0,0,0,2,6,9,8,7,2,4,5,5,6,9]
duplicate_removal_list = list(set(raw_list))
print(duplicate_removal_list)
[0, 2, 4, 5, 6, 7, 8, 9]# 结果自动排序
Python list去重
最新推荐文章于 2023-01-09 16:32:11 发布
# for example
raw_list = [0,0,0,2,6,9,8,7,2,4,5,5,6,9]
duplicate_removal_list = list(set(raw_list))
print(duplicate_removal_list)
[0, 2, 4, 5, 6, 7, 8, 9]# 结果自动排序