"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Mensanator wrote: | | > Surely enumerate() wasn't added to Python with no intention of | > ever being used. | | I see your reasons for preferring enumerate over zip, but I'm wondering | if using enumerate this way isn't a little hackish or artificial.
It seems to be a difference of personal preference. I see no reason to write a for loop (statement or expression) when a simple usage of basic builtins does the same. Mensanator apparently does. So it goes. Because zip stops when the first iterator is exhausted, the original zip with range can be pretty well future proofed with a high stop value. zip(range(9,2000000000), iterable) Of course, a non-1 step can be added to the range. tjr -- http://mail.python.org/mailman/listinfo/python-list