How to convert base 10 to base 2?

2012-08-20 Thread gianpycea
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!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to convert base 10 to base 2?

2012-08-20 Thread gianpycea
On Monday, August 20, 2012 9:50:53 AM UTC+2, (unknown) 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!

Thank you all for the big help!
@Mark Lawrence
Yes, you're definetely right: i should have posted my OS and the version but 
being a very rough question on syntax i thought it didn't really matter.
I've quite a good general programming experience. I know Java,Visual 
Basic.NET,Pascal and Mathematica.
-- 
http://mail.python.org/mailman/listinfo/python-list