Answers for "how to loop through indexes of element in python"

0

for loop with index python

presidents = ["Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson"]
for i in range(len(presidents)):
    print("President {}: {}".format(i + 1, presidents[i]))
Posted by: Guest on March-10-2021

Code answers related to "how to loop through indexes of element in python"

Python Answers by Framework

Browse Popular Code Answers by Language