- 1

Can anyone tell me what is the use of \ and \n

I am a new learner

23rd Jul 2020, 9:41 AM
Adarsh Aryan
Adarsh Aryan - avatar
5 Respostas
+ 12
In py ,backslash "\" is a special character, also called "escape" character. It is used in representing space characters: "\t" is a tab "\n" is a newline Also , prefixing a special character with \ turns it into an ordinary character.
23rd Jul 2020, 9:49 AM
Aditya
Aditya - avatar
+ 11
Can you specify your programming language..
23rd Jul 2020, 9:44 AM
Aditya
Aditya - avatar
+ 4
\n is for a newline basically moves you to the next sentence. for example System.out.print("Hello World \n Welcome to Sololearn ");
23rd Jul 2020, 9:44 AM
Nilesh
Nilesh - avatar
+ 2
It's python
23rd Jul 2020, 9:44 AM
Adarsh Aryan
Adarsh Aryan - avatar
0
\n to print in new line and \t to add space in java.please specify language.
23rd Jul 2020, 1:47 PM
shubham kumar
shubham kumar - avatar