title: Why am I getting "AttributeError: 'module' object has no attribute 'replace'" on string.replace()
body: <p>The line causing the error is </p>
  
  <pre><code>totalR = totalR + (float(string.replace(contri[0][5],",","")) + float(string.replace(contri[0][6],",","")))
  </code></pre>
  
  <p>contri[0][5] and [6] are strings that contain numbers formatted as 1,000.00.  I'm removing the commas before I cast the strings as floats in order to add them to totalR, which is a float.  (Created as totalR = 0.0)  I also tried using Decimal, but the error happened there too.  I did "import string".  The program fails with error:</p>
  
  <pre><code>File "mine.py", line 43, in fillDonorData
  totalR = totalR + (float(string.replace(contri[0][5],",","")) + float(string.replace(contri[0][6],",","")))
  AttributeError: 'module' object has no attribute 'replace'
  </code></pre>