Convert from unicode to int

Grant Edwards grante at visi.com
Thu Sep 22 09:59:35 EDT 2005


On 2005-09-22, Tor Erik Sønvisen <tores at stud.cs.uit.no> wrote:
> Hi
>
> Is there any simpler way to convert a unicode numeric to an int than:
>
> int(u'1024'.encode('ascii'))

>>> int(u'1024')
1024

Didn't that work for you when you tried it?

-- 
Grant Edwards                   grante             Yow!  FIRST, I'm covering
                                  at               you with OLIVE OIL and
                               visi.com            PRUNE WHIP!!



More information about the Python-list mailing list