title: How do I convert a string into a decimal number for arithmetic manipulation in Python?
body: <p>Similar posts such as the following do not answer my question. 
  <a href="https://stackoverflow.com/questions/1094717/convert-a-string-to-integer-with-decimal-in-python">Convert a string to integer with decimal in Python</a></p>
  
  <p>Consider the following Python code. </p>
  
  <pre><code>&gt;&gt;&gt; import decimal
  &gt;&gt;&gt; s = '23.456'
  &gt;&gt;&gt; d = decimal.Decimal(s)
  &gt;&gt;&gt; d
  Decimal('23.456')           # How do I represent this as simply 23.456?
  &gt;&gt;&gt; d - 1
  22                          # How do I obtain the output to be 22.456?
  </code></pre>
  
  <p>How do I convert a string to a decimal number, so I am able to perform arithmetic functions on it and obtain an output with the correct precision? </p>