[Python-Dev] (no subject)

Tim Peters tim.one at comcast.net
Sat Jun 19 02:39:38 EDT 2004


[Patrick Stinson]
> if you had a hex string like '0x7c' how would you convert it to an int?
>
> int(0x7c) works, but not int('0x7c')

Please address questions about Python usage to comp.lang.python, or mail to
help at python.org.  They're off-topic on python-dev.  In this case, reading
the docs for int() will answer the question (honest <wink>).





More information about the Python-Dev mailing list