|
@ -188,7 +188,7 @@ String |
|
|
|
|
|
|
|
|
### Print |
|
|
### Print |
|
|
```python |
|
|
```python |
|
|
print(<el> [, <el>, end='', sep='', file=<file>]) # Use 'file=sys.stderr' for err. |
|
|
|
|
|
|
|
|
print(<el_1> [, <el_2>, end='', sep='', file=<file>]) # Use 'file=sys.stderr' for err. |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
### Regex |
|
|
### Regex |
|
@ -224,7 +224,7 @@ import re |
|
|
|
|
|
|
|
|
### Format |
|
|
### Format |
|
|
```python |
|
|
```python |
|
|
'{}'.format(<el> [, <el>, ...]) |
|
|
|
|
|
|
|
|
'{}'.format(<el_1> [, <el_2>, ...]) |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
```python |
|
|
```python |
|
@ -270,7 +270,7 @@ Numbers |
|
|
|
|
|
|
|
|
### Basic Functions |
|
|
### Basic Functions |
|
|
```python |
|
|
```python |
|
|
round(<num>[, ndigits]) |
|
|
|
|
|
|
|
|
round(<num> [, ndigits]) |
|
|
abs(<num>) |
|
|
abs(<num>) |
|
|
math.pow(x, y) # Or: x**y |
|
|
math.pow(x, y) # Or: x**y |
|
|
``` |
|
|
``` |
|
@ -288,7 +288,7 @@ from math import cos, acos, sin, asin, tan, atan, degrees, radians |
|
|
### Logarithm |
|
|
### Logarithm |
|
|
```python |
|
|
```python |
|
|
from math import log, log10, log2 |
|
|
from math import log, log10, log2 |
|
|
log(x[, base]) # Base e, if not specified. |
|
|
|
|
|
|
|
|
log(x [, base]) # Base e, if not specified. |
|
|
log10(x) # Base 10. |
|
|
log10(x) # Base 10. |
|
|
log2(x) # Base 2. |
|
|
log2(x) # Base 2. |
|
|
``` |
|
|
``` |
|
@ -997,7 +997,7 @@ Plot |
|
|
```python |
|
|
```python |
|
|
# $ pip3 install matplotlib |
|
|
# $ pip3 install matplotlib |
|
|
from matplotlib import pyplot |
|
|
from matplotlib import pyplot |
|
|
pyplot.plot(<data> [, <data>]) |
|
|
|
|
|
|
|
|
pyplot.plot(<data_1> [, <data_2>, ...]) |
|
|
pyplot.show() |
|
|
pyplot.show() |
|
|
pyplot.savefig(<filename>, transparent=True) |
|
|
pyplot.savefig(<filename>, transparent=True) |
|
|
``` |
|
|
``` |
|
|