title: Replace elements in a list of lists python
body: <p>I have a list of lists as follows:</p>
  
  <pre><code>     list=[]
       *some code to append elements to list*
  
       list=[['a','bob'],['a','bob'],['a','john']]
  </code></pre>
  
  <p>I want to go through this list and change all instances of 'bob to 'b' and leave others unchanged.</p>
  
  <pre><code>    for x in list:
         for a in x:
            if "bob" in a:
               a.replace("bob", 'b')
  </code></pre>
  
  <p>After printing out x it is still the same as list, but not as follows:</p>
  
  <pre><code>    list=[['a','b'],['a','b'],['a','john']]
  </code></pre>
  
  <p>Why is the change not being reflected in list?</p>