fast list lookup

Kent Johnson kent3737 at
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.


More information about the Python-list mailing list