But be wary so you don&#x27;t pass in floats when creating your decimals<p><pre><code>    In [10]: from decimal import Decimal
    In [11]: Decimal(0.1) + Decimal(0.2) - Decimal(0.3)
    Out[11]: Decimal(&#x27;2.775557561565156540423631668E-17&#x27;)   

    In [12]: Decimal(&quot;0.1&quot;) + Decimal(&quot;0.2&quot;) - Decimal(&quot;0.3&quot;)
    Out[12]: Decimal(&#x27;0.0&#x27;)</code></pre>