can I get the index number in for x in y loop?

JuHui phpbird at gmail.com
Mon Apr 3 11:47:51 EDT 2006


which one has best performance?

a:for i in range(0,len(a))
b:for x in a
c:for x,y in enumerate(a)

but, it seems I cann't get index number with b format..:(




More information about the Python-list mailing list