title: How does this formatting code work?
body: <p>I always have to know why, rather than just how, so here I go:</p>
  
  <p>How does this work:</p>
  
  <pre><code>'{0:01.2f}'.format(5.555)  #returns '5.55'
  
  '{0:01.1f}'.format(5.555)  #returns '5.5'
  
  '{0:1.2f}'.format(5.555)   #returns '5.55' again
  
  '{0:1.1f}'.format(5.555)   #returns '5.5' again
  </code></pre>
  
  <p>Why does this not add zero padding by returning '05.5' instead of just '5.5' when I have the extra zero. It just doesn't seem to work.</p>
  
  <p><strong>Also, why is the string 0:1.1f instead of 0:0.1f</strong>, etc. Is it just a convention to use the number 1 before the decimal instead of a zero, or is that the syntax?</p>