RosettaCodeData/Task/Remove-duplicate-elements/Python/remove-duplicate-elements-3.py

6 lines
134 B
Python
Raw Normal View History

2013-04-10 23:57:08 -07:00
items = [1, 2, 3, 'a', 'b', 'c', 2, 3, 4, 'b', 'c', 'd']
unique = []
for x in items:
if x not in unique:
unique.append(x)