On Sun, Sep 9, 2012 at 4:29 PM, John H. Li <typeto...@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 -- http://mail.python.org/mailman/listinfo/python-list