enumerate list python for loop code example
Example 1: how to loop the length of an array pytoh
array = range(10)
for i in range(len(array)):
print(array[i])
Example 2: for loop with enumerate python
presidents = ["Washington", "Adams", "Jefferson"]
for num, name in enumerate(presidents, start=0):
print("President {}: {}".format(num, name))