⬅︎ Back to Fastest way to uniqify a list in Python
if the nicely simple list(set(seq)) appeals, then this variation may as well as its fast and preserves order:def f13(seq):# order preserving....uniq = set(seq)....return [item for item in seq if item in uniq]
Comment
if the nicely simple list(set(seq)) appeals, then this variation may as well as its fast and preserves order:
def f13(seq):
# order preserving
....uniq = set(seq)
....return [item for item in seq if item in uniq]