SyntaxFix
Write A Post
Hire A Developer
Questions
>>> '{:08b}'.format(1) '00000001'
See: Format Specification Mini-Language
Note for Python 2.6 or older, you cannot omit the positional argument identifier before :, so use
:
>>> '{0:08b}'.format(1) '00000001'