[EMAIL PROTECTED] wrote:
> or is there an alternative use of range() or something similar that can
> be as fast?

You could use xrange:

[EMAIL PROTECTED]:~$ python -m timeit -n10000 "1 in range(10000)"
10000 loops, best of 3: 260 usec per loop
[EMAIL PROTECTED]:~$ python -m timeit -n10000 "1 in xrange(10000)"
10000 loops, best of 3: 0.664 usec per loop
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to