print() without any argument adds an invisible newline character.
Answers
Answered by
2
Answer:
You can also use this character in f-strings:
>>> print(f"Hello\nWorld!")
The New Line Character in Print Statements
By default, print statements add a new line character "behind the scenes" at the end of the string.
Like this:
This occurs because, according to the Python Documentation:
The default value of the end parameter of the built-in print function is \n, so a new line character is appended to the string
Explanation:
Similar questions