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

Skip to content

Commit a302202

Browse files
committed
Struct
1 parent 189db88 commit a302202

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -868,15 +868,15 @@ Struct
868868
------
869869
**This module performs conversions between Python values and C struct represented as Python Bytes object.**
870870
```python
871-
<Bytes> = struct.pack('<format>', <value_1> [, <value_2>, ...])
872-
<tuple> = struct.unpack('<format>', <Bytes>)
871+
from struct import pack, unpack, calcsize
873872
```
874873

875-
### Example
876874
```python
877-
>>> from struct import pack, unpack, calcsize
875+
<Bytes> = pack('<format>', <value_1> [, <value_2>, ...])
876+
<tuple> = unpack('<format>', <Bytes>)
878877
```
879878

879+
### Example
880880
```python
881881
>>> pack('hhl', 1, 2, 3)
882882
b'\x00\x01\x00\x02\x00\x00\x00\x03'

0 commit comments

Comments
 (0)