the sum of values of a second column of a file
<p>I have a txt file containing on each line 2 values separated by a space:</p>

<pre><code>x1 y1
x2 y2
x3 y3
...
xn yn
</code></pre>

<p>I want to get another file containing:</p>

<pre><code>x1 y1
x2 y1+y2
x3 y1+y2+y3
...
xn y1+y2+y3+...+yn
</code></pre>

<p>What is the quickest (I mean easiest) way to do this in python ?</p>
