title: How to search a string for substrings from one list, and then change those substrings to a string from another list?
body: <p>For example:</p>
  <pre><code>list1 = ['mory','alphabet','fruit']
  list2 = ['apple','banana','pear']
  
  string = &quot; There was a mory and the thing was a alphabet within the fruit. There were still fruit. But the banana was still there.&quot;
  </code></pre>
  <p>Now what I want to do is to change each appearance of a word from <code>list1</code> with its equivalent in <code>list2</code>. For example, &quot;There was a mory&quot; will be changed to &quot;There was a apple&quot;.</p>
  <p>I want to do this using for loops, however I cannot figure out how to run the list multiple times to change every part of the string.</p>