python:对list去重
1、set()方法 numbers = [1,7,3,2,5,6,2,3,4,1,5] new_numbers = list(set(numbers)) print new_numbers 输出 [1, 2, 3, 4, 5, 6, 7] ...
1、set()方法 numbers = [1,7,3,2,5,6,2,3,4,1,5] new_numbers = list(set(numbers)) print new_numbers 输出 [1, 2, 3, 4, 5, 6, 7] ...