I can\'t figure out why the code #1 returns an extra empty line while code #2 doesn\'t. Could somebody explain this? The difference is an extra comma at the end of the code
In order to not have a blank line, you need , at the end of the print statement
,
Example:
for i in range(10): print i, >>>0 1 2 3 4 5 6 7 8 9 for i in range(10): print i >>> 0 1 2 3 4 5 6 7 8 9