Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb21e6a

Browse files
committed
Struct
1 parent 3aa852f commit cb21e6a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,13 +875,19 @@ Struct
875875
### Example
876876
```python
877877
>>> from struct import pack, unpack, calcsize
878+
```
878879

880+
```python
879881
>>> pack('hhl', 1, 2, 3)
880882
b'\x00\x01\x00\x02\x00\x00\x00\x03'
883+
```
881884

885+
```python
882886
>>> unpack('hhl', b'\x00\x01\x00\x02\x00\x00\x00\x03')
883887
(1, 2, 3)
888+
```
884889

890+
```python
885891
>>> calcsize('hhl')
886892
8
887893
```

0 commit comments

Comments
 (0)