One option for Python 2.6 and later is to use bytearray:
>>> b = bytearray('hello')
>>> b[0]
104
>>> b[1]
101
>>> list(b)
[104, 101, 108, 108, 111]
For Python 3.x, you need bytesan object, not a string anyway, and therefore can just do it
>>> b = b'hello'
>>> list(b)
[104, 101, 108, 108, 111]
source
share