1.from_bytes
bytes='\x00\x00\x00\x00\x00\x00\x02\xeb';
value=int.from_bytes(bytes, byteorder='big')
print("xxxxxxx",value)
2.to_bytes
byt2 = (54).to_bytes(7, byteorder='big') print("---",byt2)
1.from_bytes
bytes='\x00\x00\x00\x00\x00\x00\x02\xeb';
value=int.from_bytes(bytes, byteorder='big')
print("xxxxxxx",value)
2.to_bytes
byt2 = (54).to_bytes(7, byteorder='big') print("---",byt2)