title: Find and replace strings in a python dictionary
body: <p>I have a dictionary that looks like:</p>
  
  <pre><code>d = {'alleged': ['truths', 'fiels', 'fact', 'infidelity', 'incident'],
   'greased': ['axle', 'wheel', 'wheels', 'fields', 'enGine', 'pizza'],
   'plowed': ['fields', 'field', 'field', 'incident', '', '']}
  </code></pre>
  
  <p>I would like to go over it and replace some items for another strings. The strings to be find and the ones to replace them are also in a dictionary, in which the key is the string to be found and the value is the string to replace it:</p>
  
  <pre><code>d_find_and_replace = {'wheels':'wheel', 'Field': 'field', 'animals':'plants'}
  </code></pre>
  
  <p>I tried to use a function like:</p>
  
  <pre><code>def replace_all(dic1, dic2):
      for i, j in dic.items():
          dic3 = dic1.replace(i, j)
      return(dic3)
  </code></pre>
  
  <p>but it won't work because obviously, it uses replace built-in function <code>replace</code> inside it, and it is not possible to use it for dictionaries. Any suggestions on how to do this? Thank you very much for any help.</p>
  
  <p><strong>Edited to correct spelling mistakes.</strong></p>