Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 189db88 commit a302202Copy full SHA for a302202
README.md
@@ -868,15 +868,15 @@ Struct
868
------
869
**This module performs conversions between Python values and C struct represented as Python Bytes object.**
870
```python
871
-<Bytes> = struct.pack('<format>', <value_1> [, <value_2>, ...])
872
-<tuple> = struct.unpack('<format>', <Bytes>)
+from struct import pack, unpack, calcsize
873
```
874
875
-### Example
876
877
->>> from struct import pack, unpack, calcsize
+<Bytes> = pack('<format>', <value_1> [, <value_2>, ...])
+<tuple> = unpack('<format>', <Bytes>)
878
879
+### Example
880
881
>>> pack('hhl', 1, 2, 3)
882
b'\x00\x01\x00\x02\x00\x00\x00\x03'
0 commit comments