create array with for loop python code example Example: python for loop in array for i in foo: print(i) #outputs 'foo' then 'bar'