Use bytearray:
with open("img.png", "rb") as image:
f = image.read()
b = bytearray(f)
print b[0]
You can also have a look at struct which can do many conversions of that kind.
Use bytearray:
with open("img.png", "rb") as image:
f = image.read()
b = bytearray(f)
print b[0]
You can also have a look at struct which can do many conversions of that kind.