[Tutor] Re: Number Conversion routines

Bill Bell bill-bell@bill-bell.hamilton.on.ca
Tue, 10 Jul 2001 13:51:27 -0400


"Praveen Pathiyil" <ppathiyi@cisco.com> wrote, in part:
> Is there any module or built-in routines which does conversion
> between different represenations of numbers ? I mean binary-to-hex,
> hex-to-binary, binary-to decimal etc. 

See "2.1.5.2 String Formatting Operations" in the Python library 
reference. I don't know of built-in ways of processing binary. Easiest 
way I can think of would be to convert to or from octal.