import struct #pi = 0x3141pi = b'\x31\x41\x59' msb, lsb = struct.unpack('>HB', pi)print(msb) # 12609 (0x3141)print(lsb) # 89 (0x59)
Standard input is empty
12609 89
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!