Converting binary to base 10 is easy:
>>> int('11111111', 2)
255

Converting base 10 number to hex or octal is easy:
>>> oct(100)
'0144'
>>> hex(100)
'0x64'

Is there an *easy* way to convert a number to binary?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to