def hi_3x3(): return [['hi' for i in xrange(3)] for j in xrange(3)] a = hi_3x3() for row in a: print row
Standard input is empty
['hi', 'hi', 'hi'] ['hi', 'hi', 'hi'] ['hi', 'hi', 'hi']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!