摘要:
Python列表去掉重复元素的一种方法:>>> L = [1, 2, 3, 4, 1, 2, 3, 4, 5]>>> [x for x in L if x not in locals()['_[1]']][1, 2, 3, 4, 5]解释如下:down vote Referencing a list comprehension as it is being built...You can reference a list comprehension as it is being built by the symbol '_[1] 阅读全文