How do you express an integer as a binary number with Python literals?
I was easily able to find the answer for hex:
>>> 0x12AF 4783 >>
>>> print int('01010101111',2) 687 >>> print int('11111111',2) 255
Another way.