title: Replacing list item with contents of another list
body: <p>Similar to <a href="https://stackoverflow.com/questions/2582138/finding-and-replacing-elements-in-a-list-python">this question</a>, but instead of replacing one item with another, I'd like to replace any occurrences of one item with the contents of a list.</p>
  
  <pre><code>orig = [ 'a', 'b', 'c', 'd', 'c' ]
  repl = [ 'x', 'y', 'z' ]
  desired = [ 'a', 'b', 'x', 'y', 'z', 'd', 'x', 'y', 'z' ]
  
  # these are all incorrect, or fail to compile
  [ repl if x == 'c' else x for x in orig ]
  [ [a for a in orig] if x == 'c' else x for x in orig ]
  [ (a for a in orig) if x == 'c' else x for x in orig ]
  [ a for a in orig if x == 'c' else x for x in orig ]
  </code></pre>
  
  <p>Edit: made it clear I meant to replace <em>all</em> occurrences of the item, rather than just the first. (Apologies to anyone who didn't cover that case in their answer.)</p>