Algorithm used by keyword 'in'

Derek Rhodes rhoder at worldpath.net
Sat Oct 9 16:54:09 CEST 2004


#using python 2.4a3

say there is a list:

list = range(10000)

Now randomize it.

Next, command the interpreter:

>>>  465 in list
True
>>>

What algorithm is used here?


-Derek.





More information about the Python-list mailing list