+ 4
[SOLVED]Magic letter bug
this code is supposed to output "letter/s". but whenever I call up more then one letter. it adds a space to the first line. why? can someone explain? https://code.sololearn.com/cFPFjvwDsXPr/?ref=app
5 Respuestas
+ 6
Nice code 😊👌 the thing is, in Python3, by default there's a space between multiple values printed. So what you can do is just add the "separator" argument to the print function and set it to an empty string, like this:
print(a, b, c, sep="")
+ 2
format string?
+ 2
Ok thx Pao
0
Python adds a space after each variable. You could use a format string to print how you want stuff printed
0
https://docs.python.org/3/tutorial/inputoutput.html#old-string-formatting