Python list of lists to divide an element position on all sublists by a number
<p>How can in python take a lists of lists and apply a division to the third element of each sublist.</p>

<p>The sublists looks like this </p>

<pre><code>[1.3735876284e-05, 0.9277849431216683, 34.02875434027778, 0.0]
[2.60440773e-06,   7.35174234e-01,   2.79259180e+02,   0.00000000e+00]
...
</code></pre>

<p>I need to get the same sublists but the third element of each sublist (34.02 ..., 2.79 ...) should be divided by 100</p>

<p>use a list comprehension to extract sub-lists, and use addition to concatenate list parts...</p>

<p><code>lambda L: [l[:2]+[l[2]/100]+l[3:] for l in L]</code></p>

python list