How do you print in python
Question:
I would like to print a backslash character:
But whne I try to use escape characters
print("")
I get a syntax error. I have looked into ecape characters, however is their a specific one for backslash ()?
Answers:
It is simple, just escape the escape character itself:
print("\")
If you do
print("")
you are escaping the final quote.
You need to escape the backslash.
print("\")
I would like to print a backslash character:
But whne I try to use escape characters
print("")
I get a syntax error. I have looked into ecape characters, however is their a specific one for backslash ()?
It is simple, just escape the escape character itself:
print("\")
If you do
print("")
you are escaping the final quote.
You need to escape the backslash.
print("\")