Hex numbers

Padraig at Linux.ie Padraig at Linux.ie
Thu Jan 23 11:15:30 CET 2003


Petri Järvinen wrote:
> I have a string '0xff00ff' and I want to store it as a hex-number not string.

int('0xff00ff',16)
#or
int('0xff00ff',0)
#or
eval('0xff00ff')

http://tardis.redbrick.dcu.ie/532/groups.google.com

Pádraig.





More information about the Python-list mailing list