1foo = ['foo', 'bar']
2for i in foo:
3 print(i) #outputs 'foo' then 'bar'
4for i in range(len(foo)):
5 print(foo[i]) #outputs 'foo' then 'bar'
6i = 0
7while i < len(foo):
8 print(foo[i]) #outputs 'foo' then 'bar'
1colors = ["red", "green", "blue", "purple"]
2i = 0
3while i < len(colors):
4 print(colors[i])
5 i += 1
6
1array = ["Var1","Var2","Var3"]
2for i in range(len(array)):
3 print(array[i])
4
5#Output#
6#Var1
7#Var2
8#Var3