title: Use String.Replace in a Python for loop
body: <p>I want to use <strong>string.replace</strong> using for loop. This is my code: </p>
  
  <pre><code>new = ['p','q','r']
  my_str = 'there are two much person a, person b, person c.'
  old = ['a','b','c']
  
  for i in range(0,len(old)):
      my_str = string.replace(my_str,old[i],new[i])
  
  print(my_str)
  </code></pre>
  
  <p>But it is giving me error:</p>
  
  <blockquote>
    <p>TypeError: 'str' object cannot be interpreted as an integer</p>
  </blockquote>
  
  <p>Desired output:</p>
  
  <blockquote>
    <p>there are two much person p, person q, person r.</p>
  </blockquote>
  
  <p>This is just an example, I want to run a for loop for 10,000 length list. </p>