how to print out each single char from a string in HEX format?

mike needpassion at gmail.com
Tue Jun 5 01:03:39 CEST 2007


guys,

I've researched python pretty much but still have no idea how to print
out each single character from a string in HEX format? Hope someone
can give me some hints. Thanks a lot.

e.g.    ###here is a string

          a='01234'

          ###how to print out it out in this way

          0x31 0x31 0x32 0x33 0x34




More information about the Python-list mailing list