标签:div style list 顺序 print code 去重 ret ted
(1)[11, 33, 4, 2, 11, 4, 9, 2]去重并保持原来的顺序?
li = [11,33,4,2,11,4,9,2] set1 = list(set(li)) ret = sorted(set1,key=li.index) print(ret)
面试笔试
原文地址:https://www.cnblogs.com/zsdbk/p/9388319.html