![]() |
|
|
+ Search |
![]()
|
Jun 20th, 2000 19:40
unknown unknown, Jarkko Torppa, Thomas Wouters
>>> eval('0x32')
50
>>> import string
# Forces base to 16(hex)
>>> string.atoi('32',16)
50
# Guesses base from leading characters
>>> string.atoi('0x32',0)
Note that in Python 1.6, you can do the above two things like this:
>>> int('0x32',16)
50
>>> int('0x32',0)
50