Limited to 1 byte - Noah Campbell 18 minutes ago
The best way to do this is to create an instance of the struct unpacker.
from struct import Struct
unpacker = Struct("b")
unpacker.unpack("z")[0]
Please note that you can change “b” to “B” if you need an unsigned bike. In addition, endian format is not required.
, , .