range() is not the best way to check range?

Dan Bishop danb_83 at yahoo.com
Mon Jul 17 22:49:19 EDT 2006


Summercoolness at gmail.com wrote:
> it seems that range() can be really slow:
...
>     if i in range (0, 10000):

This creates a 10,000-element list and sequentially searches it.  Of
course that's gonna be slow.




More information about the Python-list mailing list