Some source code

Adam Przybyla adam at gliwice.pl
Sun Feb 22 15:14:44 CET 2004


nnes <pruebauno at latinmail.com> wrote:
> file('output.txt','w').writelines(['%s,"%s"\n' % (line[:-1],
>     sum(map(int,line[1:-2].split('","')))) for line in
>     file('input.txt')])
file('output.txt','w').writelines(['%s,"%s"\n' % 
      (line[:-1],sum(eval(line[1:-2]))) for line in file('input.txt')])
Regards
								Adam Przybyla



More information about the Python-list mailing list