title: Python: How do I format numbers for a fixed width?
body: <p>let's say </p>
  
  <pre><code>numbers = [ 0.7653, 10.2, 100.2325, 500.9874 ]
  </code></pre>
  
  <p>I'd like to output the numbers with a fixed width by varying the number of decimal places to get an output like this:</p>
  
  <pre><code>0.7653
  10.200
  100.23
  500.98
  </code></pre>
  
  <p>is there an easy way to do this?  I've been trying with various <code>%f</code> and <code>%d</code> configurations with no luck.</p>