\N Means New Line. It Means That the Cursor Must Go to the Next Line. \R Means Carriage Return. It Means That the Cursor Should Go Back to the Beginning of the...
\n means new line.It means that the cursor must go to the next line.\r means carriage return. It means that the cursor should go back to the beginning of the line.
Are \n and \r the same?
historically a \n was used to move the carriage down, while the \r was used to move the carriage back to the left side of the page.
In Python strings, the backslash "\" is a special character, also called the "escape" character. It is used in representing certain whitespace characters: "\t" is a tab, "\n" is a newline, and "\r" is a carriage return.
Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.