|
@ -295,23 +295,6 @@ import re |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Print |
|
|
|
|
|
----- |
|
|
|
|
|
**Use `'file=sys.stderr'` for errors.** |
|
|
|
|
|
|
|
|
|
|
|
```python |
|
|
|
|
|
print(<el_1> [, <el_2>, end='', sep='', file=<file>]) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```python |
|
|
|
|
|
>>> from pprint import pprint |
|
|
|
|
|
>>> pprint(locals()) |
|
|
|
|
|
{'__doc__': None, |
|
|
|
|
|
'__name__': '__main__', |
|
|
|
|
|
'__package__': None, ...} |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Format |
|
|
Format |
|
|
------ |
|
|
------ |
|
|
```python |
|
|
```python |
|
@ -824,6 +807,21 @@ script_name = sys.argv[0] |
|
|
arguments = sys.argv[1:] |
|
|
arguments = sys.argv[1:] |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### Print |
|
|
|
|
|
**Use `'file=sys.stderr'` for errors.** |
|
|
|
|
|
|
|
|
|
|
|
```python |
|
|
|
|
|
print(<el_1> [, <el_2>, end='', sep='', file=<file>]) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```python |
|
|
|
|
|
>>> from pprint import pprint |
|
|
|
|
|
>>> pprint(locals()) |
|
|
|
|
|
{'__doc__': None, |
|
|
|
|
|
'__name__': '__main__', |
|
|
|
|
|
'__package__': None, ...} |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
### Input Function |
|
|
### Input Function |
|
|
* **Reads a line from user input or pipe if present.** |
|
|
* **Reads a line from user input or pipe if present.** |
|
|
* **The trailing newline gets stripped.** |
|
|
* **The trailing newline gets stripped.** |
|
|
xxxxxxxxxx