On Mon, Apr 30, 2012 at 8:41 PM, viral shah <shahviral...@gmail.com> wrote: > for i in range (5): > for j in range (i): > print i > print " "
The print command (you're clearly using Python 2 here - it's slightly different in Python 3) by default prints a whole line - that is, it finishes with a newline or '\n'. You'll find information on how to suppress that here: http://docs.python.org/reference/simple_stmts.html#the-print-statement Hope that helps! Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list