0
"\h\h" Why this returns '\\h\\h' inside python ?
4 Answers
+ 3
Do you mean?
The "\\h\\h" is the input.
And the "\h\h" is output.
Then it is because backslash are used for escaping characters, so here the interpreter will recognize that "h" is being escaped by the backslash before it. And so If you want to print the backslash itself, then you also have to escape it (the backslash)
Or you can just use the "r" prefix for strings
r means raw or raw string
For example:
print( "\\n\\n" )
>> \n\n
print( r"\n\n" )
>> \n\n
+ 1
ă Nicko12 ă yeah :)
0
â¤â˘â đđ˘đ˘đđ¨ đđĄđđ˛đđĽ ââ˘â¤ well, it not happens with print.
Never mind I searched and got my answer, anywas thanks for trying :)