Converting hex string to an integer

Rick Holbert holbertr at dma.org
Thu Aug 26 08:21:38 EDT 2004


Derek Fountain wrote:

> Given the character string "0x00A1B2C3" arriving at sys.argv[1] how do I
> convert that to an integer which I can do some math on?

i = eval(sys.argv[1])




More information about the Python-list mailing list