I am a newbie in the field of python. I recently came across \r (carriage return). It seems like it performs the same task as \n. Can anyone tell me the difference between \r and \n and specify the operation of \r?
Asked
Active
Viewed 1,877 times
0
-
Windows line endings are `\r\n` and most other systems are a plain `\n` – dawg Dec 31 '20 at 03:25
-
2This is not specifically a Python thing. It's the same as the difference between `$'\r'` and `$'\n'` in bash, for example. – Charles Duffy Dec 31 '20 at 03:32