>>> 'realne cislo {0:020.3f}'.format(31415926.535897) 
'realne cislo 0000000031415926.536'

>>> 'cele cislo {0:020b}'.format(165)
'cele cislo 00000000000010100101'

>>> 'cele cislo {0:20b}'.format(165)
'cele cislo             10100101'
