Here you have some alternatives: http://www.peterbe.com/plog/uniqifiers-benchmark
Fastest one:
def f7(seq):
seen = set()
seen_add = seen.add
return[ x for x in seq ifnot(x in seen or seen_add(x))]
down vote accepted
|
Here you have some alternatives: http://www.peterbe.com/plog/uniqifiers-benchmark Fastest one:
|