Skip to content

Commit 3ac3f19

Browse files
committed
Array and deque
1 parent 2c1b57e commit 3ac3f19

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,30 @@ b'\x00\x01\x00\x02\x00\x00\x00\x03'
955955
* `'d'` - double (8)
956956

957957

958+
Array
959+
-----
960+
**List that can only hold elements of predefined type. Available types are listed above.**
961+
962+
```python
963+
from array import array
964+
<array> = array(<typecode> [, <collection>])
965+
```
966+
967+
968+
Deque
969+
-----
970+
**Short for “double-ended queue” and pronounced “deck”. They are thread-safe lists with efficient appends and pops from either side.**
971+
972+
```python
973+
from collections import deque
974+
<deque> = deque(<collection>, maxlen=None)
975+
<deque>.appendleft(<el>)
976+
<deque>.extendleft(<collection>) # Collection gets reversed.
977+
<el> = <deque>.popleft()
978+
<deque>.rotate(n=1) # Rotates elements to the right.
979+
```
980+
981+
958982
Hashlib
959983
-------
960984
```python

0 commit comments

Comments
 (0)