parsed.org

In Python you can use the array module to quickly convert ASCII values to a string and back again.

>>> import array
>>> array.array('B', [97, 98, 99]).tostring()
'abc'
>>> array.array('B', 'abc').tolist()
[97, 98, 99]

For more information, read Python Patterns - An Optimization Anecdote.

arraysasciiconversionmodulesoptimizationpython
RSS