0
Same Line
is there a way that i can get all of this to go across on one line instead of going down https://code.sololearn.com/c9sDNX4e34xz/#py
3 Answers
+ 3
By default pythonâs print() function ends with a newline.
Pythonâs print() function comes with a parameter called âendâ. By default, the value of this parameter is â\nâ, i.e. the new line character. You can end a print statement with any character/string using this parameter.
EXAMPLE:
ends the output with a <space>Â
print("Welcome to" , end = ' ')Â
print("SOLOLEARN", end = ' ')
Output :
Welcome to SOLOLEARN
+ 1
Print("something",end=''")
Allows you to print without going to the next line
- 1
while I'm laying in bed trying to sleep I ended up figuring out but y'all way seems easier.