标签:列表 list lis not set append int python for
list=[1, 2, 3, 4,‘a‘,‘b‘,‘c‘,‘a‘,2, 3, 2,"b",‘c‘,‘d‘,‘e‘,‘f‘,‘d‘]
# s = set(list)#用set方法
# print(s)
s =[]
for i in list: #列表去重
if i not in s:
s.append(i)
list = s
print(list)
标签:列表 list lis not set append int python for
原文地址:https://www.cnblogs.com/niucunguo/p/11405389.html