hex to int

Antaeus Feldspar feldspar at ix.netcom.com
Thu Feb 14 15:30:46 EST 2002


Bjorn Pettersen wrote:
> 
> > From: maximilianscherr [mailto:MaximilianScherr at T-Online.de]
> >
> > how can i convert hex to int?
> >
> 
> I'm assuming you're asking how to convert a string representation of a
> hexadecimal to an integer...
> 
> >>> int('0xff', 16)
> 255
> 
> -- bjorn

In what version of Python do they introduce that?  In the documentation
I have int() is listed as taking one and exactly one argument.  The code
you list doesn't work for me.

	-jc



More information about the Python-list mailing list