encode string to ascii python code example
Example 1: string to ascii value python
>>> s = 'hi'
>>> [ord(c) for c in s]
[104, 105]
Example 2: python int to ascii string
chr(97) -> 'a'
>>> s = 'hi'
>>> [ord(c) for c in s]
[104, 105]
chr(97) -> 'a'