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