enumerated while loop

Roald de Vries rdv at roalddevries.nl
Sat Jan 23 10:30:30 EST 2010


On Jan 23, 2010, at 3:58 PM, Mark Dickinson wrote:

> On Jan 23, 2:44 pm, Roald de Vries <r... at roalddevries.nl> wrote:
>> I assume a function like 'naturals' already exists, or a similar
>> construction for the same purpose. But what is it called?
>
> itertools.count()



On Jan 23, 2010, at 4:04 PM, Jan Kaliszewski wrote:

> itertools.count() -- see http://docs.python.org/library/itertools.html#itertools.count
>
>> for i, item in enumerate(iterable):
>>     ....
>
> That's completely beside the point.

Thanks guys





More information about the Python-list mailing list