python for loop with indices code example
Example 1: for loop with index python3
colors = ["red", "green", "blue", "purple"]
for i in range(len(colors)):
print(colors[i])
Example 2: python for loop with index
colors = ["red", "green", "blue", "purple"]
for i in range(len(colors)):
print(colors[i])