hex to normal chars?

Jason Orendorff jason at jorendorff.com
Sat Feb 2 19:39:04 EST 2002


maximillianscherr writes:
> how can i transfer hex numbers to normal chars, like "41" to "A" etc.?

>>> '41'.decode('hex')
'A'
>>> 'jason'.encode('hex')
'6a61736f6e'
>>> '6a61736f6e'.decode('hex')
'jason'

## Jason Orendorff    http://www.jorendorff.com/





More information about the Python-list mailing list