new_list = list(set(my_list))
seen = {} new_list = [seen.setdefault(x, x) for x in my_list if x not in seen]