[Python-ideas] first() and last() tests in for x in y loops

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Jul 20 19:13:13 CEST 2010

On Tue, Jul 20, 2010 at 1:03 PM, et gmail <eric.twilegar at gmail.com> wrote:
> Also it would be nice if there was an auto counter like
> For item in List with count x … where x would then be an auto counter that
> incremented every iteration of the loop.

This feature is already there:

for  num,item in enumerate(List):

I would like to suggest that when you don't know how to achieve
certain result in python, you first ask on python-list or #python IRC
channel.   It is best to propose new features after users agree that
the feature is not present.

More information about the Python-ideas mailing list