Contact: aviboots(AT)netvision.net.il
43,903 questions
57,300 answers
573 users
n = 65296 bytes = n.to_bytes(2, byteorder="big") print(bytes) ''' run: b'\xff\x10' '''
n = 65296 bytes = n.to_bytes(2, byteorder="little") print(bytes) ''' run: b'\x10\xff' '''
n = 65296 bytes = n.to_bytes(4, byteorder="little", signed=True) print(bytes) ''' run: b'\x10\xff\x00\x00' '''