Answers for "how to loop throught list faster and check for conditions"

4

iterate through an array python

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

python iterate list

lst = [10, 50, 75, 83, 98, 84, 32]
 
for x in range(len(lst)): 
    print(lst[x])
Posted by: Guest on August-27-2020

Code answers related to "how to loop throught list faster and check for conditions"

Python Answers by Framework

Browse Popular Code Answers by Language