title: python replace list values using a tuple
body: <p>If I have a list:</p>
  
  <pre><code>my_list = [3,2,2,3,4,1,3,4]
  </code></pre>
  
  <p>and a tuple</p>
  
  <pre><code>my_tuple = (3,5)
  </code></pre>
  
  <p>What's the best way of replacing elements in <code>my_list</code> using the tuple:</p>
  
  <pre><code>result = [5,2,2,5,4,1,5,4]
  </code></pre>
  
  <p>e.g.</p>
  
  <pre><code>for item in my_list:
      if(item == my_tuple[0]):
          item = my_tuple[1]
  </code></pre>
  
  <p>More generally, I would have a list of lists, and a list of tuples, and I would like to apply each of the tuples to each of the lists within the list of lists.</p>