ID EN
Struct

unpack

Python 3.11

Unpack from the buffer buffer (presumably packed by pack(format, ...)) according to the format string format. The result is a tuple even if it contains exactly one item. The buffer’s size in bytes must match the size required by the format, as reflected by calcsize().

Syntax

PYTHON
struct.unpack(format, buffer)

See Also

calcsize()