What is the meaning of \r and \n Python?
Mia Tucker
Updated on May 15, 2026
\n is the newline character, while \r is the carriage return. (They differ in what uses them.) ------- Windows uses \r\n to signify the enter key was pressed.
Mia Tucker
Updated on May 15, 2026