SEE UPDATE BELOW
--
Suppose you have a list in python that looks like this:
['a','b','a']
# or like this:
[1,2,2,2,3,4,5,6,6,6,6]
and you want to remove all duplicates so you get this result:
['a','b']
# or
[1,2,3,4,5,6]
How do you do that? ...the fastest way? I wrote a couple of alternative implementations and did a quick benchmark loop on the various implementations to find out which way was the fastest. (I haven't looked at memory usage). The slowest function was 78 times slower than the fastest function.