title: Correct way to format integers with fixed length and space padding
body: <p>I have integer numbers in the range of 0 up until (including) 100. I want to convert them to strings of a fixed length of 3 with space padding and alignment to the right.</p>
  
  <p>I've tried to use the following format string, but it adds another space for three digit numbers, which makes them length 4 instead of 3.</p>
  
  <pre><code>fmt = lambda x: "{: 3d}".format(x)
  [fmt(99), fmt(100)] # produces [' 99', ' 100'] instead of [' 99', '100']
  </code></pre>
  
  <p>Interestingly, it works as expected when zero-padding is used:</p>
  
  <pre><code>fmt = lambda x: "{:03d}".format(x) 
  [fmt(99), fmt(100)] # produces ['099', '100'] as expected
  </code></pre>
  
  <p>Why is this? How can I fix this?</p>
  
  <p>Do I really need to convert to string first?</p>
  
  <pre><code>fmt = lambda x: "{:&gt;3s}".format(str(x))
  [fmt(99), fmt(100)] # produces [' 99', '100'] as expected
  </code></pre>