0
What is the meaning of \\n
3 ответов
+ 13
\\ is used for floor division \\n doesn't have a specific function or meaning in python. As mark pointed it \n is a new line.
+ 3
basicly after \n text go to next line
#try
print("1st line\n 2nd line" )
0
but if you wanted to print "\n", you would need to preceed the escape char '\' with a '\' to tell the compiler to treat the '\' as a plain charactor
so print("this is a slash \\")
some languages have you include special chars in single ' 'or triple double quotes """/"""