How to convert a number to hex number?

Hako princismo at yahoo.com.tw
Tue Nov 8 04:28:35 EST 2005


I try this command:
>>> import string
>>> string.atoi('78',16)
120
this is 120 not 4E.

Someone can tell me how to convert a decimal number to hex number? Can
print A, B, C,DEF.
Thank you.




More information about the Python-list mailing list