I have a problem concerning the conversion from integer to bytes in Python 3. e.g:
a = 31
a.to_bytes(length=1, byteorder="little", signed=False)
will result in:
b'\x1f'
or
a = 155
a.to_bytes(length=1, byteorder="little", signed=False)
will result in:
b'\x9b'
So far so good. But e.g. with:
a = 46
a.to_bytes(length=1, byteorder="little", signed=False)
will result in:
b'.'
What did I do wrong? Or what is the problem here?