The output of two consecutive print () functions is usually displayed in a branch line, that is, when you call the print () function to wrap and end the current line, what if you want two print () functions to print on one line?
We know that there are two parameters Sep and end parameters in print (). The comma in the print () function is replaced by a space by default with a newline character at the end. where Sep is substituted for the delimiter, end is the newline character in place of the ending. For example:
Coffee_cup = ' Coffee '
print ("I Love Me", Coffee_cup, "!", sep= "*") "" "The
output result is:
I love my*coffee*!
" ""
The End function is used to define a line of output
Coffee_cup = ' Coffee '
print ("I Love Me", Coffee_cup, "!", end= "End_flag") "" "The
output result is: I love my
coffee! End_flag "" "
Then, if you want to print two print () functions on one line, you can use the end argument to change the default newline character to a space or blank
Print ("Hello", end = "")
print ('
! ')
"
" "" The output result is:
hello world*! "" "