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

mike needpassion at gmail.com
Mon Jun 4 19:03:39 EDT 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