Python 3 bytes.index: better way?
Yes, that's the way to do it.
It's not much different from the way to search for a character in a string based on its code point:
x = 0x32
i ='1234'.index(chr(x))
Yes, that's the way to do it.
It's not much different from the way to search for a character in a string based on its code point:
x = 0x32
i ='1234'.index(chr(x))