\r and \n differences in Python
Solved
excelise
-
excelise Posted messages 12 Status Member -
excelise Posted messages 12 Status Member -
Hello,
In Python, what is the difference between \r and \n?
I'm referring here to two elements that are sometimes included in strings.
Thank you in advance
Configuration: Windows Vista / Internet Explorer 8.0
In Python, what is the difference between \r and \n?
I'm referring here to two elements that are sometimes included in strings.
Thank you in advance
Configuration: Windows Vista / Internet Explorer 8.0
For example in
input("your message \n")It depends on the OS.
Specifically, to go to the next line under Windows, you need to use \r\n.
Under GNU/Linux, you need to use \n, and under Mac OS, \r.