remove duplicates from list *preserving order*

Steven Bethard steven.bethard at gmail.com
Mon Feb 7 00:34:15 EST 2005


John Machin wrote:
> So, just to remove ambiguity, WHICH one of the bunch should be
> retained? Short answer: "the first seen" is what the proverbial "man in
> the street" would expect

For my purposes, it doesn't matter which instance is retained and which 
are removed, so yes, retaining the first one is quite acceptable.  (That 
was also the simplest thing to do, so that's why all my solutions did that.)

Steve



More information about the Python-list mailing list