text = [1, 2, 3, 2, 5]
text_info = []
for i in text:
if i not in text_info:
text_info.append(i)
print(text_info)
运行结果

text = [1, 2, 3, 2, 5]
text_info = []
for i in text:
if i not in text_info:
text_info.append(i)
print(text_info)
运行结果