title: Put zeros in front of a number to make it 4 digits
body: <p>I have a number of four or fewer digits, e.g. <code>8</code> or <code>12</code> or <code>197</code>. I'd like to put 0's in front of this number until it is 4 digits long, e.g. <code>0008</code> or <code>0012</code> or <code>0197</code>. What would be the easiest way to go about this in Python? What would be the most "Pythonic"?</p>
  
  <p>I could do a series of if statements, like so:</p>
  
  <pre><code>if len(number) == 1:
      number = '000' + number
  ...
  </code></pre>
  
  <p>But I have a feeling there is a more elegant way.</p>