def unique_list(xs):
seen = set()
# not seen.add(x) here acts to make the code shorter without using if statements, seen.add(x) always returns None.
return [x for x in xs if x not in seen and not seen.add(x)]
def unique(l):
seen = set()
u_list = []
for x in l:
if not x in seen:
u_list.append(x)
seen.add(x)
return u_list