0

What is the use of "\n, \t, \r" in python

30th Aug 2020, 4:27 AM
Balam RaviKumar
Balam RaviKumar - avatar
5 Answers
+ 5
These all are the escape sequences in python. Have a look http://www.python-ds.com/python-3-escape-sequences
30th Aug 2020, 4:47 AM
Ayush Kumar
Ayush Kumar - avatar
+ 4
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. Conversely, prefixing a special character with "\" turns it into an ordinary character. First read basics pls dont ask here such types of question you can find answers in solo tutorials . Only question posting is not solution you can search on Google also do some hardwork .
30th Aug 2020, 4:31 AM
đŸ’«AsđŸ’«
đŸ’«AsđŸ’« - avatar
+ 2
\n for next line \t for tab \r use backspace and any slash in your code
30th Aug 2020, 4:30 AM
Akash Agrawal
Akash Agrawal - avatar
- 1
"\n"=newline "\t" = space "\r" backspace
30th Aug 2020, 6:04 PM
XYNCSTEP
XYNCSTEP - avatar