Unique Elements in a List

Fredrik Lundh fredrik at pythonware.com
Tue May 10 05:54:59 EDT 2005


Max M wrote:

>> depending on the data, it might be more efficient to store the
>> "last seen index" in a dictionary, and sort the result on the way
>> out (if necessary).  something like
>
> form sets import Set
>
> data = list(Set([0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9]))

read the OP's spec again.

</F> 






More information about the Python-list mailing list