python traverse list index 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: python enumerate for loop
presidents = ["Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson"]
for num, name in enumerate(presidents, start=1):
print("President {}: {}".format(num, name))