面试题编程题01-python 删除列表中重复项
1 oldlist=[1,2,4,2,4,5,6,5,7,8,9,8] 2 newlist=[] 3 for i in oldlist: 4 if i not in newlist: 5 newlist.append(i) 6 print(newlist)
1 oldlist=[1,2,4,2,4,5,6,5,7,8,9,8] 2 newlist=[] 3 for i in oldlist: 4 if i not in newlist: 5 newlist.append(i) 6 print(newlist)