pack
Pack data into hex string with little endian format.
def pack(
structure: string,
data: tuple
) - > bytes
Pack data into hex string with little endian format.
Parameters
| Name | Type | Description |
|---|---|---|
| structure | string | The format string using standard struct module syntax that defines the layout of the data |
| data | tuple | A sequence of values to be packed into the byte string according to the specified structure |
Returns
| Type | Description |
|---|---|
bytes | A byte string containing the packed data formatted according to the little-endian structure string |