Answers for "python loop over array with index and ell"

5

python for loop array index

colors = ["red", "green", "blue", "purple"]
i = 0
while i < len(colors):
    print(colors[i])
    i += 1
Posted by: Guest on August-29-2020
0

iterating index array python

colors = ["red", "green", "blue", "purple"]
for i in range(len(colors)):
    print(colors[i])
Posted by: Guest on December-23-2021

Code answers related to "python loop over array with index and ell"

Python Answers by Framework

Browse Popular Code Answers by Language