1 a = [11,11,22,33,44,55,22,33,44] 2 3 # 方法一 4 # b = [] 5 # for i in a: 6 # if i not in b: 7 # b.append(i) 8 # print(b) 9 10 f = set(a) # 集合去重 11 b = list(f) # 类型转换 12 print(b)