-1

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
Tanim_113
  • 321
  • 1
  • 3
  • 11

2 Answers2

5

Print in raw by adding an r before the quotations:

print(r"tanim\anamul")

or use '\\':

print("tanim\\anamul")
iDrwish
  • 3,085
  • 1
  • 15
  • 24
2

Simple:

print("tanim\\anamul")

\ is used as an escape character to create a number of special codes:

\t = TAB \n = LF \r = CR \\ = \