title: Is there any way I can change the number of decimal place of a float with .format() using a variable instead of a literal?
body: <p>I want to make a code so that the user of my code will print e (2.7182818284590452353602874713527) with the decimal places according to the number inputted by the user. This is my code right now.</p>
  <pre><code>    e = 2.7182818284590452353602874713527 
      dp = int(input(&quot;Give a positive integer: &quot;))
      print('e is: {:.dpf}'.format(e)) #the precision needs to be an input from the user
  </code></pre>