Structure Conversion

StatementFunction

pack(formatstring, valueslist)

Converts the scalar values in valueslist into a single string using the format control string formatstring.

unpack(formatstring, string)

Returns a list of values generated from string, using the format control defined in formatstring. Performs the reverse operation of pack().