title: loop through a python list of tuples and change a value
body: <p>I have this code</p>
  
  <pre><code>a=[(1,'Rach', 'Mell', '5.11', '160'),(2, 'steve', 'Rob', '6.1', '200'), (1,'Rach', 'Mell', '5.11', '160')]
  </code></pre>
  
  <p>I want to change the last name Rob to 'Roberto' if the id = 2<br>
  So my idea was to change the tuple to a list so it will be easy to make the change</p>
  
  <p>I tried :</p>
  
  <pre><code>a_len = len(a)
  count = 0
  a_list = []
  while(count &lt; a_len):
       a_list.append(a[count])
       count ++
  
  for x, element in a_list:
       if element[0] == 2:
            a_list[x] = Roberto
  </code></pre>
  
  <p>But this didn't work, do you guys have any idea how to do that?</p>
  
  <p>Thanks!</p>