Convert string to ASCII value python

You can use a list comprehension:

>>> s = 'hi'
>>> [ord(c) for c in s]
[104, 105]

Here is a pretty concise way to perform the concatenation:

>>> s = "hello world"
>>> ''.join(str(ord(c)) for c in s)
'10410110810811132119111114108100'

And a sort of fun alternative:

>>> '%d'*len(s) % tuple(map(ord, s))
'10410110810811132119111114108100'

If you are using python 3 or above,

>>> list(bytes(b'test'))
[116, 101, 115, 116]