Why is there a white space that outputs when I print something like this in Python 3 ?
(Is it in the '\n' character itself ?)
print (my_var1, '\n', my_var_2)
sep keyword argument) after every argument, including `\n'. You might want combine the three strings into a single argument yourself.
print(my_var1 + '\n' + my_var2)
Better than either of theses would be to use the
format string method:
which both handles conversion to
str if necessary and eliminates any temporary objects.
I would prefer, though, setting
\n as in @billy's answer.