title: python: replace item in a list with items in a another list
body: <p>I have a dictionary:</p>
  
  <pre><code>d = {'name': ['sarah', 'emily', 'brett'], 'location': ['LA', 'NY', 'Texas']}
  </code></pre>
  
  <p>I also have a list:</p>
  
  <pre><code>l = ['name', 'location']
  </code></pre>
  
  <p>I want to replace 'name' in the list <code>l</code> with the list <code>['sarah', 'emily', 'brett']</code> in dictionary <code>d</code> (same thing for location). </p>
  
  <p>So the outcome would be:</p>
  
  <pre><code>l = ['sarah', 'emily', 'brett', 'LA', 'NY', 'Texas']
  
  for item in l:
      l.append(d[item])
      l.remove(item)
  </code></pre>
  
  <p>this is what I did and I got a type error, unhashable type: 'list'.
  what should I do to fix this?</p>