xs = ['foo', 'bar', 'baz'] for x in xs: print(x) for idx, x in enumerate(xs): print(idx, x)
Standard input is empty
foo bar baz 0 foo 1 bar 2 baz
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!