On Fri, 07 Dec 2012 14:46:03 +0100, Marco wrote: > Hi all, do you think this code: > > $ more myscript.py > for line in open('data.txt'): > result = sum(int(data) for data in line.split(';')) > print(result) [...] > is explicit enough? Do you prefer a clearer solution? Thanks in advance,
It's perfectly fine for such a simple script. It is readable and explicit. -- Steven -- http://mail.python.org/mailman/listinfo/python-list