How to convert base 10 to base 2?

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Aug 20 04:10:25 EDT 2012


On 20/08/2012 08:50, gianpycea at gmail.com wrote:
> Hi,
> as you can argue from the subject, i'm really,really new to python.
> What is the best way to achieve that with python? Because the syntax int('30',2) doesn't seem to work!
>

When you have a problem please cut and paste the exact thing that you 
tried with the entire traceback.  "Doesn't seem to work" doesn't tell us 
a lot.  Your OS and Python version is usually needed as well but we 
might be able to skip those details in this case :)  How much general 
programming experience do you have?

-- 
Cheers.

Mark Lawrence.




More information about the Python-list mailing list