title: Can a variable be used in Python to define decimal places
body: <p>I'm familiar with the convention of using <code>%.2f</code> to set two decimal places for a float but is it in any way possible to change the number to a variable so that the user can state the number of decimal places displayed?</p>