there is some strange while converting from INT to BYTES. the function i used to convert: (int).to_bytes(byte lenght,'big') in my specific cases i tried to convert 31 to Bytes, it showed:
b = (31).to_bytes(1,'big')
b
b'\x1f'
but when i convert the 10 or lager than 31. it will show another unexpected value:
b = (10).to_bytes(1,'big')
b
b'\n'
==> b value here supposed to be: b'\x0a'. i don't know why it return b'\n' please let me know the secret behind.
same with value 50.
b = (50).to_bytes(1,'big')
b
b'2'
==> b value supposed to be b'x\32'
Please help.....