Unpack a byte object according to a format string
suggest changefrom struct import unpack
print(unpack('I3c', b'{\x00\x00\x00abc')) # (123, b'a', b'b', b'c')
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents