Given you have a number in 'a' :

hex(a)

returns the hexadecimal representation of 'a' as a string !
You can also try :

"%x" % a

After that, I don't know if there is some builtin to print a number in any base you want !

Pierre

Tamm, Heiko a écrit :
Hello,
I like to know, if it's possible to convert a Hex number into String or
other formats?
How can it be done?
Kind regards
Heiko




------------------------------------------------------------------------

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

-- Pierre Barbier de Reuille

INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP
Botanique et Bio-informatique de l'Architecture des Plantes
TA40/PSII, Boulevard de la Lironde
34398 MONTPELLIER CEDEX 5, France

tel   : (33) 4 67 61 65 77    fax   : (33) 4 67 61 56 68
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to