[Python-ideas] Uniquify attribute for lists

Serhiy Storchaka storchaka at gmail.com
Fri Nov 16 15:37:54 CET 2012


On 16.11.12 15:17, Michael Foord wrote:
> On 16 November 2012 12:39, Paul Moore
> <p.f.moore at gmail.com
> <mailto:p.f.moore at gmail.com>> wrote:

>     list(set(ls))
>
>
> This loses order.

list(collections.OrderedDict.fromkeys(ls))





More information about the Python-ideas mailing list