title: Limiting floats to two decimal points
body: <p>I want <code>a</code> to be rounded to <em>13.95</em>. I tried using <a href="https://docs.python.org/2/library/functions.html#round" rel="nofollow noreferrer"><code>round</code></a>, but I get:</p>
  <pre><code>&gt;&gt;&gt; a
  13.949999999999999
  &gt;&gt;&gt; round(a, 2)
  13.949999999999999
  </code></pre>
  <hr />
  <p><sub>For the analogous issue with the standard library Decimal class, see <a href="https://stackoverflow.com/questions/1995615">How can I format a decimal to always show 2 decimal places?</a>.</sub></p>