Is there a unique method in python to unique a list?
Chris Angelico
rosuav at gmail.com
Sun Sep 9 02:32:48 EDT 2012
More information about the Python-list mailing list
Sun Sep 9 02:32:48 EDT 2012
- Previous message (by thread): Is there a unique method in python to unique a list?
- Next message (by thread): Is there a unique method in python to unique a list?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Sep 9, 2012 at 4:29 PM, John H. Li <typetoken at gmail.com> wrote: > However, if I don't put list(set(lemma_list)) to a variable name, it works > much faster. Try backdenting that statement. You're currently doing it at every iteration of the loop - that's why it's so much slower. But you'll probably find it better to work with the set directly, instead of uniquifying a list as a separate operation. ChrisA
- Previous message (by thread): Is there a unique method in python to unique a list?
- Next message (by thread): Is there a unique method in python to unique a list?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list