python for on array code example
Example 1: for element in array python
itemlist = []
for j in range(len(myarray)):
item = myarray[j]
itemlist.append(item)
Example 2: python for loop in array
for i in foo:
print(i) #outputs 'foo' then 'bar'