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