wbowers <[EMAIL PROTECTED]> wrote:

> I agree that using range() for simple iterations is the way to go.

except that as Terry said, "The large majority of use cases for iteration 
are iterating though sequences"

I very rarely use range() in iterations.

> Here are some examples of python expressions you'd use in specific
> situations:
> 

...

> # instead of for (i = 99; i >= 0; i--)
> for i in range(100)[::-1]: pass

or:
  for i in xrange(99, -1, -1): pass


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to