ID EN
Struct

Struct

Python 3.11

Return a new Struct object which writes and reads binary data according to the format string format. Creating a Struct object once and calling its methods is more efficient than calling module-level functions with the same format since the format string is only compiled once.

Syntax

PYTHON
class struct.Struct(format)

See Also

Struct Struct pack() size pack_into() unpack() size unpack_from()