Converting FROM decimal

insyte at petra.squad51.net insyte at petra.squad51.net
Sun Sep 24 23:13:40 EDT 2000


>>I've found several references here and there (FAQTS, etc.) about
>>converting from hex, octal, etc. to decimal, but nothing about going
>>the other way.  I suppose I could write my own function, but I can't
>>believe there isn't something already in the Python repertoire to do
>>this.
>
>There are builtins to do those conversions:
>
>>>> hex(10)
>'0xa'
>>>> oct(10)
>'012'

How did I miss those?  Dang.

Ben


-- 
Ben Beuchler                                         insyte at bitstream.net
MAILER-DAEMON                                         (612) 321-9290 x101
Bitstream Underground                                   www.bitstream.net



More information about the Python-list mailing list