ID EN
Struct

calcsize

Python 3.11

Return the size of the struct (and hence of the bytes object produced by pack(format, ...)) corresponding to the format string format.

Syntax

PYTHON
struct.calcsize(format)