+ 3
In terminal if x='xyz \ uv' and then put x after >>>prompt it gives 'xyz \\ uv' but if I use print(X) it gives 'xyz \ uv'
I am unable to understand the reason of difference between the outputs
1 Respuesta
+ 2
With backslash you can escape special characters, or create newlines (\n) or tabs (\t), so, without the extra backslash you would be escaping the space after it.
I don't know why both give different results tho