Feb-07-2021, 04:07 PM
I am using a byte as an example because in some languages, a small int = 1 byte. 0-255
I don't understand how your example relates to my problem?
I don't understand how your example relates to my problem?
(Feb-05-2021, 06:16 PM)deanhystad Wrote: What makes you think you are using a byte? I don't think Python has a byte type.
It has "bytes", but there are no bytes in bytes.
>>> x = (5).to_bytes(1, 'big') >>> x b'\x05' >>> type(x) <class 'bytes'> >>> x[0] 5 >>> type(x[0]) <class 'int'>bytes is a list of ints