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 odpowiedzi
+ 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.