0
"\h\h" Why this returns '\\h\\h' inside python ?
4 Antworten
+ 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 :)