I'd use the int and chr casts.  e.g.,

new_string = ""
a = '012'
new_string += chr(int(a))

Just in case the 012 is an octal code I'll mention that to cast to int
in general you can pass the base, as in int('034',8) or int('AF',16)

Cheers,

 Keir.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to