I have a byte data is like: b'\xc4\x03\x00\x00\xe2\xecqv\x01'.
How do I convert this to integer like index by index.
a bytes object is basically already a (immutable) sequence of integers.
b = b'\xc4\x03\x00\x00\xe2\xecqv\x01'
b[0] # 196
lst = list(b)
# [196, 3, 0, 0, 226, 236, 113, 118, 1]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With