Skip to content

Commit 485172d

Browse files
committed
List and Set
1 parent 2f7ef58 commit 485172d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ List
2020
```python
2121
<list> = <list>[from_inclusive : to_exclusive : step_size]
2222
<list>.append(<el>)
23-
<list>.extend(<list>)
23+
<list>.extend(<collection>)
2424
<list> += [<el>]
25-
<list> += <list>
25+
<list> += <collection>
2626
```
2727

2828
```python
2929
<list>.sort()
3030
<list>.reverse()
31-
<list> = sorted(<list>)
31+
<list> = sorted(<collection>)
3232
<iter> = reversed(<list>)
3333
```
3434

@@ -95,7 +95,7 @@ Set
9595
```python
9696
<set> = set()
9797
<set>.add(<el>)
98-
<set>.update(<set>)
98+
<set>.update(<collection>)
9999
<set> |= {<el>}
100100
<set> |= <set>
101101
```
@@ -1416,7 +1416,7 @@ duration = time() - start_time
14161416
```python
14171417
from timeit import timeit
14181418
timeit('"-".join(str(a) for a in range(100))',
1419-
number=10000, globals=globals())
1419+
number=10000, globals=globals(), setup='pass')
14201420
```
14211421

14221422
### Line Profiler
@@ -1456,6 +1456,11 @@ with PyCallGraph(output=graph):
14561456
NumPy
14571457
-----
14581458
**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+
14591464
```python
14601465
<array> = np.array(<list>)
14611466
<array> = np.arange(from_inclusive, to_exclusive, step)

0 commit comments

Comments
 (0)