python how to do for loop number of array code example Example: python for loop in array for i in foo: print(i) #outputs 'foo' then 'bar'