On 07/07/2012 12:59 AM, redstone-cold wrote: > What’s the differences between these two pieces of code ? > > (1) > > for i in range(1, 7): > > print(2 * i, end=' ') > > > > > > (2) > > for i in range(1, 7): > > print(2 * i, end=' ') > > print() > > > > > > when executed both respectively in Python shell ,I get the same effect . > Who can tell me why ? >
The difference is that the first will give a syntax error, and not run. Once you fix that, the second will print an extra blank line at the end. -- DaveA _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
