lst = eval(input(‘请输入列表:’))
list1 = lst
it = list1
print(it)
it1 = []
for i in it:
if i not in it1:
it1.append(i)
print(it1)
输入一个列表,打印出列表中不重复的元素
最新推荐文章于 2022-09-22 18:19:46 发布
lst = eval(input(‘请输入列表:’))
list1 = lst
it = list1
print(it)
it1 = []
for i in it:
if i not in it1:
it1.append(i)
print(it1)