mirror of
https://github.com/satwikkansal/wtfpython.git
synced 2025-07-22 05:51:16 +02:00
Update README.md
This commit is contained in:
2
README.md
vendored
2
README.md
vendored
@@ -1228,7 +1228,7 @@ True
|
|||||||
>>> print("\n")
|
>>> print("\n")
|
||||||
|
|
||||||
>>> print(r"\\n")
|
>>> print(r"\\n")
|
||||||
'\\\\n'
|
'\\n'
|
||||||
```
|
```
|
||||||
- This means when a parser encounters a backslash in a raw string, it expects another character following it. And in our case (`print(r"\")`), the backslash escaped the trailing quote, leaving the parser without a terminating quote (hence the `SyntaxError`). That's why backslashes don't work at the end of a raw string.
|
- This means when a parser encounters a backslash in a raw string, it expects another character following it. And in our case (`print(r"\")`), the backslash escaped the trailing quote, leaving the parser without a terminating quote (hence the `SyntaxError`). That's why backslashes don't work at the end of a raw string.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user