4 ms·
you can also print binary in python like so: >>>print bin(12) 0b1100 >>>
by Keyframe 17y ago
you can also print binary in python like so:
>>>print bin(12)
0b1100
>>>
- pkrumins 17y agoOnly Python 2.6 I think, and it does not print negatives very nicely (it prints bin(-x) = -bin(x), instead of some number representation).
- Keyframe 17y agoyes, you are right python >2.6 only
- tetha 17y agoThe best tool I know to do such things is i (debian package iprint): tetha@dev-server:~$ i 12 12 0xC 014 0b1100 '\f'