File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 20
20
``` python
21
21
< list > = < list > [from_inclusive : to_exclusive : step_size]
22
22
< list > .append(< el> )
23
- < list > .extend(< list > )
23
+ < list > .extend(< collection > )
24
24
< list > += [< el> ]
25
- < list > += < list >
25
+ < list > += < collection >
26
26
```
27
27
28
28
``` python
29
29
< list > .sort()
30
30
< list > .reverse()
31
- < list > = sorted (< list > )
31
+ < list > = sorted (< collection > )
32
32
< iter > = reversed (< list > )
33
33
```
34
34
95
95
``` python
96
96
< set > = set ()
97
97
< set > .add(< el> )
98
- < set > .update(< set > )
98
+ < set > .update(< collection > )
99
99
< set > |= {< el> }
100
100
< set > |= < set >
101
101
```
@@ -1416,7 +1416,7 @@ duration = time() - start_time
1416
1416
``` python
1417
1417
from timeit import timeit
1418
1418
timeit(' "-".join(str(a) for a in range(100))' ,
1419
- number = 10000 , globals = globals ())
1419
+ number = 10000 , globals = globals (), setup = ' pass ' )
1420
1420
```
1421
1421
1422
1422
### Line Profiler
@@ -1456,6 +1456,11 @@ with PyCallGraph(output=graph):
1456
1456
NumPy
1457
1457
-----
1458
1458
** Array manipulation mini language. Can run up to 100 times faster than equivalent Python code.**
1459
+ ``` python
1460
+ # $ pip3 install numpy
1461
+ import numpy as np
1462
+ ```
1463
+
1459
1464
``` python
1460
1465
< array> = np.array(< list > )
1461
1466
< array> = np.arange(from_inclusive, to_exclusive, step)
You can’t perform that action at this time.
0 commit comments