+ 1
What is the output of the following code and why? #python 3
print("\") print("\\") print("\t") print("\\t") print("\\\t")
6 Answers
+ 3
Go to Sololearn's playground and paste the code there to see the output.
+ 2
Error Line 1.
+ 2
Thanks âđŒ
+ 1
I know the output... Of each line, but it's confusing to understand escape sequences
+ 1
The first line throws an error, because backlashes in a string are used for special characters, such as "\n" means new line.
"\\" will print only one \
Read this: https://docs.python.org/2.0/ref/strings.html
0
You got a error in first line beacouse backslace is use as a special symbol that's why you got a error