摘要: #方式一 l1 = [1, 2, 333, 7, 1, 8, 19, 1, 2, 333] res = list(set(l1)) res.sort(key=l1.index) print(res) #方式2 l1 = [1, 2, 333, 7, 1, 8, 19, 1, 2, 333] res = [] for i in l1: if i not in res: ... 阅读全文
posted @ 2018-03-31 13:50 小学弟- 阅读(112) 评论(0) 推荐(0) 编辑