What is the fasted way to get a sorted, unique list in python? (I have a list of hashable things, and want to have something I can iterate over - doesn\'t matter whether the lis
>>> import itertools >>> a=[2,3,4,1,2,7,8,3] >>> list(k for k,_ in itertools.groupby(sorted(a))) [1, 2, 3, 4, 7, 8]