[Tutor] Re: 'number' strings error

alan.gauld@bt.com alan.gauld@bt.com
Sun, 4 Mar 2001 17:36:49 -0000


> >>> age = int('42')
> >>> print type(age)
> <type 'int'>
> ###
> 
> It's easier to type than string.atoi('42'), and more 
> versatile.  It can work with floating point numbers too:

But unlike atoi can't do different number bases like hex 
or binary. Thats where atoi really is necessary.

Just a nit pick.

Alan G.