...

/

Strings and the Backslashes

Strings and the Backslashes

We'll cover the following...

Backslashes with strings can get tricky at times.

Press + to interact
print("\"")
print(r"\"")
Press + to interact
print(r"\")
Press + to interact
print(r'\'' == "\\'")

Explanation

  • In a usual python string, the backslash is used to escape
...