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'
1itemlist = []
2for j in range(len(myarray)):
3 item = myarray[j]
4 itemlist.append(item)