fast list lookup

Kent Johnson kent3737 at yahoo.com
Wed Jan 26 10:08:23 EST 2005


Klaus Neuner wrote:
> Hello,
> 
> what is the fastest way to determine whether list l (with
> len(l)>30000) contains a certain element?

If you can use a set or dict instead of a list this test will be much faster.

Kent



More information about the Python-list mailing list