Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

for loop with enumerate python

presidents = ["Washington", "Adams", "Jefferson"]
for num, name in enumerate(presidents, start=0):
    print("President {}: {}".format(num, name))
 
PREVIOUS NEXT
Tagged: #loop #enumerate #python
ADD COMMENT
Topic
Name
5+3 =