⬅︎ Back to Fastest way to uniqify a list in Python
Kirby had the right idea but his implementation is more complicated than it needs to be.def f7(seq): return list(set(seq))You can drop the wrapping list() if you just need a sequence and not a real list. In that case the function is justf7 = set
Comment
Kirby had the right idea but his implementation is more complicated than it needs to be.
def f7(seq): return list(set(seq))
You can drop the wrapping list() if you just need a sequence and not a real list. In that case the function is just
f7 = set