Best way to make a list unique?
Michael Hoffman
cam.ac.uk at mh391.invalid
Wed Mar 9 03:23:41 EST 2005
Delaney, Timothy C (Timothy) wrote:
> I've proposed this on python-dev, but the general feeling so far is
> against it. So far the only use case is to remove duplicates without
> changing order, and there are iterator-based solutions which would
> normally be preferable.
I've needed a dict that would iterate in a specific order many a time.
Usually I just make a list that contains the keys and iterate over that
instead of dict.keys().
--
Michael Hoffman
More information about the Python-list
mailing list