Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

print index and value on each iteration of the for loop in Python

index = 1
for name in names:
     print(index, name)
     index += 1
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #print #index #iteration #loop #Python
ADD COMMENT
Topic
Name
9+6 =