Possible to modify every first tuple element in a list of tuples?
<p>I need your help, I have a structure like this:</p>

<pre><code>myList = [(1,2,3),(2,4,4),(1,5,6)]
</code></pre>

<p>it's a list of tuples. Now I need to get every first element of each tuple in the list to e.g. replace each 1 with a 3.</p>

<p>The output should be: <code>myList = [(3,2,3),(2,4,4),(3,5,6)]</code></p>

<p>I know I can make it like:</p>

<pre><code>for item in myList:
   if item[0] == 1:
      item[0] = 3
</code></pre>

<p>But is there a other way to do this? without iterating over the whole list?</p>

<p>Something like: <code>myList.getFirstItemOfEachTuple.replace(1,3)</code></p>

<p>EDIT: I could change the <code>myList</code> to <code>[[1,2,3,4,5,6]...]</code> if necessary.</p>
