Inside the brackets, you can write several character strings, separated by commas, all of them will be automatically displayed on the screen with a space.
If the space between the lines is not needed, then when calling the function, you need to add another argument with the name sep = ""
(the value of the argument is equal to an empty line) For example, the output of the phrase
Hello,World!
(without spaces),
can be organized in this way
print("Hello,","World!",sep="")
Each new
print
command outputs text from a new line.
For instance. when writing such a program
print("Hello,")
print("World!")
Appears on the screen
Hello,
World!
You can cancel a newline by using the argument
end = ""
(the value of the argument is equal to an empty line)
REMEMBER
1 Each
print
command outputs text from a new line
2 When specifying multiple character strings, inside one print command, all strings will be displayed with a space
3 If the space needs to be removed, at the end we write
sep = ""
4 When writing multiple output commands, you can cancel the transition to a new line. To do this, add the
end = ""
argument at the end
Practice solving the problem!