Convert from unicode to int

Max M maxm at mxm.dk
Thu Sep 22 16:01:06 CEST 2005


Tor Erik Sønvisen wrote:
> Hi
> 
> Is there any simpler way to convert a unicode numeric to an int than:
> 
> int(u'1024'.encode('ascii'))


why doesn't:

     int(u'104')

work for you?


-- 

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science



More information about the Python-list mailing list