mirror of
https://github.com/satwikkansal/wtfpython
synced 2025-07-04 20:38:06 +02:00
Update README.md
fix bug: `'''` means multi-line output in print function
This commit is contained in:
parent
145a194c8b
commit
e4268d1c6f
1 changed files with 3 additions and 2 deletions
5
README.md
vendored
5
README.md
vendored
|
@ -700,7 +700,7 @@ SyntaxError: invalid syntax
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### ▶ Half triple-quoted strings
|
### ▶ Half triple-quoted strings (which is wrong in orinial version)
|
||||||
|
|
||||||
**Output:**
|
**Output:**
|
||||||
```py
|
```py
|
||||||
|
@ -712,7 +712,8 @@ wtfpython
|
||||||
>>> # print('''wtfpython')
|
>>> # print('''wtfpython')
|
||||||
>>> # print("""wtfpython")
|
>>> # print("""wtfpython")
|
||||||
```
|
```
|
||||||
|
(by zc_):
|
||||||
|
in fact, `print ‘’‘wtfpython'` will not raise Error, it will wait you to enter another `'''` as the end of multi-line string.
|
||||||
#### 💡 Explanation:
|
#### 💡 Explanation:
|
||||||
+ Python supports implicit [string literal concatenation](https://docs.python.org/2/reference/lexical_analysis.html#string-literal-concatenation), Example,
|
+ Python supports implicit [string literal concatenation](https://docs.python.org/2/reference/lexical_analysis.html#string-literal-concatenation), Example,
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue