title: How to prevent rounding off of the last digit when using string formatting in python?
body: <p>The following code:</p>
  
  <pre><code>&gt;&gt;&gt; a
  54685.1546432
  &gt;&gt;&gt; c = f"{a:,f}"
  &gt;&gt;&gt; c
  </code></pre>
  
  <p>Gives the following output:</p>
  
  <pre><code>'54,685.154643'
  </code></pre>
  
  <p>As you can see, python has automatically rounded off the last digit from 'a' to 'c'.
  Desirable answer for 'c' is </p>
  
  <pre><code>'54,685.1546432'
  </code></pre>
  
  <p>Can anyone suggest how to achieve this? </p>
  
  <p>Edit: After some research, I found out this can be achieved by the following: f"{a:,}"
  Thanks, everyone for the answers, if someone can direct me how to close this question it would be great!</p>