python 列表推导的注意点

Code

1 a = [1,2,2,3]
2 b = [for item in a if item not in b]
3 
4 c = []
5 for item in a:
6     if item not in c:
7         c.append(item)

b -- [1,2,2,3]

c -- [1,2,3]

原文地址:https://www.cnblogs.com/mess4u/p/3957535.html