6 AnswersNew Answer
Yeah, this is quite tricky. The string is saved containing a double backslash so that, when it is printed, it returns exactly what the user entered. The backslash is an escape character which means the next character has a special purpose. The backslash and the character after it are not printed normally. Escaping the backslash (i.e. a double backslash) means that it does get printed (along with everything else). See here: https://code.sololearn.com/cJF11138P0ZA/?ref=app Hope this helps.
This means that a slash has been added to the phrase to escape from the( \n) 's mission, which is escaping a new line, and that to only print what actually the user had entered. It isn't?
Yeah, I think what you're saying is right. The backslash is the escape character. It tells the parser to deal with the following charcter differently. If you escape the escape charcter, you are telling the parser to leave the escape charcter as it is, and to print it as normal. This means that the newline gets ignored.
I understand now. Thanks for explaining it to me.
No worries 😊
double backslash means \ or \n means new line :) like This : print("Hey\nHello") #output Hey Hello print("GNU\\LInux") #output GNU\Linux print("Don\"t") #output: don"t print("don't") # output don't print("Hello\tWorld") #output Hello World