howto print binary number

dmitrey dmitrey.kroshko at scipy.org
Wed May 7 16:13:40 EDT 2008


hi all,
could you inform how to print binary number?
I.e. something like

print '%b' % my_number

it would be nice would it print exactly 8 binary digits (0-1, with
possible start from 0)

Thank you in advance, D



More information about the Python-list mailing list