mirror of
https://github.com/satwikkansal/wtfpython.git
synced 2024-09-11 20:17:08 +03:00
Clarify for quoting examples
The example of the use of backslash to escape a double-quote makes more sense when used inside a double-quoted string. If the string is quoted with single quotes, one could of course just write 'wt"f' withouth requiring any escaping.
This commit is contained in:
parent
de113d2491
commit
3e99005ae4
2
README.md
vendored
2
README.md
vendored
@ -1210,7 +1210,7 @@ True
|
||||
|
||||
- In a usual python string, the backslash is used to escape characters that may have a special meaning (like single-quote, double-quote, and the backslash itself).
|
||||
```py
|
||||
>>> 'wt\"f'
|
||||
>>> "wt\"f"
|
||||
'wt"f'
|
||||
```
|
||||
- In a raw string literal (as indicated by the prefix `r`), the backslashes pass themselves as is along with the behavior of escaping the following character.
|
||||
|
Loading…
Reference in New Issue
Block a user