[Pythonmac-SIG] repeat loop question

tom smith tom@othermedia.com
Thu, 07 Dec 2000 17:06:06 +0000


n = 0
the_list = ["a", "b", "c"]

for i in the_list:
    print n, i
    n=n+1


...is there a way of getting the "count" of i without having to hand
increment n?

thanks

tom