title: Is it possible to use format() function with a string in format's place?
body: <p>I'm using a format() in python and I want to use a variable <code>pokablelio</code> so that the person could choose how many numbers to output after the dot. When I try to put the variable alone after the comma it outputs: <code>ValueError: Invalid format specifier</code>. I tried replacing some characters or making the whole string in a parentheses but that didn't work.</p>
  <p>Right now I'm wondering: Can I even use a variable as a string to put it in format's place?</p>
  <p>(note: The machine should have a &quot;'.10f'&quot; string in the variable)</p>
  <p><a href="https://i.stack.imgur.com/HVUOn.png" rel="nofollow noreferrer">Error and the code</a></p>