Guido van Rossum <guido at python.org> writes: > And I think that what you really wanted is probably closer to this: > > >>> import binascii > >>> binascii.hexlify('ABC') > '414243' > >>> Or >>> 'ABC'.encode('hex_codec') '414243' >>> '414243'.decode('hex_codec') 'ABC' /Bob