How to understand this python code?
<p>This code is from the book Learning python and it is used to sum columns in a text file separated by commas. I really can't understand line 7, 8 &amp;9.
Thanks for the help. Here is the code:</p>

<pre><code>filename='data.txt'
sums={}
for line in open(filename):
    cols=line.split(',')
    nums=[int(col) for col in cols]
    for(ix, num) in enumerate(nums):
        sums[ix]=sums.get(ix, 0)+num
for key in sorted(sums):
    print(key, '=', sums[key])
</code></pre>
