How to iterate over list in python
From DevOps Notebook
Iterate trough list with for loop in python:
# example list
list = [1, 2, 22, 55, 29]
# for loop
for i in list:
print(i)
Using enumerate() in for loop with list in python
# example list
list = [1, 2, 22, 55, 29]
# Using enumerate() with for loop
for i, val in enumerate(list):
print (i, ",",val)