Long int to int

Gerhard Häring gh_pythonlist at gmx.de
Mon Feb 11 06:23:27 EST 2002


Le 11/02/02 à 03:12, Paul Rubin écrivit:
> Tim Howarth <tim at worthy.demon.co.uk> writes:
> > (Or worse, I can convert with eval
> > 
> > a = str(hex(a))[2:-1]
> > a = eval('0x'+a)
> 
>   a = eval('0x%x' % a)

Wow, simpler. And I thought I knew at least the Python basics.

Gerhard
-- 
This sig powered by Python!
Außentemperatur in München: 9.2 °C      Wind: 6.6 m/s




More information about the Python-list mailing list