
Notice that the value of end is \n, so this will be added to the end of the string. 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. This occurs because, according to the Python Documentation: You can also use this character in f-strings: > print(f"Hello\nWorld!") 🔸 The New Line Character in Print Statementsīy default, print statements add a new line character "behind the scenes" at the end of the string. If you see this character in a string, that means that the current line ends at that point and a new line starts right after it:

Knowing how to use it is essential if you want to print output to the console and work with files.

Welcome! The new line character in Python is used to mark the end of a line and the beginning of a new line.
