For the following code I want to print out the "tanim\anamul". But when I execute this it show. tanim\namul. How can I solve this problem.
>>> print("tanim\anamul")
tanimnamul
For the following code I want to print out the "tanim\anamul". But when I execute this it show. tanim\namul. How can I solve this problem.
>>> print("tanim\anamul")
tanimnamul
Print in raw
by adding an r
before the quotations:
print(r"tanim\anamul")
or use '\\':
print("tanim\\anamul")
Simple:
print("tanim\\anamul")
\ is used as an escape character to create a number of special codes:
\t
= TAB
\n
= LF
\r
= CR
\\
= \