Python: Update columns in a list dependant on the value in another column : <p>Assume I have the following list: </p>

<pre><code>list = [["A",0,"C"],["B",1,"C"]]
</code></pre>

<p>I want to do something that accomplishes the following: Set the values in the 1st column equal to "D" where the value in the 2nd column is equal to 0.</p>

<p>So the list after the update should look like this:</p>

<pre><code>list = [["D",0,"C"],["B",1,"C"]]
</code></pre>
