Answers for "\n vs \r python"

1

difference \n \r python

\n is the classic line_feed on Unix/Linux (his ascii is 10 in decimal and 0a in hexadecimal)
\r\n is the classic line_feed on Windows
\r is the classic line_feed on olds version of MacOs (pre-MacOsX version) (his ascii is 13 in decimal an 0d in hexadecimal)
Posted by: Guest on June-17-2020
0

\n vs \r python

\n   vs   \r

QUESTION:     What is the difference between \n and \r?

\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.
-------  Linux and Unix use   \n.
Posted by: Guest on September-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language