title: Variable number of decimal digits in string.format
body: <p>I want to transform this:</p>
  
  <pre><code>my_number = 3.1415928
  
  if precision == 2:
      my_string = "{0:.2f}".format(my_number)
  elif precision == 3:
      my_string = "{0:.3f}".format(my_number)
  elif precision == 4:
      my_string = "{0:.4f}".format(my_number)
  elif precision == 5:
      my_string = "{0:.5f}".format(my_number)
  </code></pre>
  
  <p>Into something like this:</p>
  
  <pre><code>my_number = 3.1415928
  
  my_string = "{SOMETHING_DEPENDING_ON_PRECISION_HERE}".format(my_number)
  </code></pre>
  
  <p>Is it possible and how to do it?</p>