[Tutor] a quick Q: how to use for loop to read a series of files with .doc end
Francesco Loffredo
fal at libero.it
Fri Oct 28 20:15:01 CEST 2011
lina wrote:
>
>
> On Fri, Oct 7, 2011 at 9:38 AM, Dave Angel <d at davea.name <mailto:d at davea.name>> wrote:
>
> On 10/06/2011 12:21 PM, lina wrote:
>
> <snip>
>
> Yes. I understand this part now. But how can I print a list consists of the value of key B + E.
>
> For {'B': [4, 5, 6], 'E': [1, 2, 3]}
>
> I wanna get the summary of B and E in each column, namely [5, 7, 9]
> <snip>
My two cents on this very long thread:
tot = [0]*numcolumns
for q in result.values():
tot = [i+j for i, j in zip(tot, q)]
-----
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com
Versione: 2012.0.1834 / Database dei virus: 2092/4578 - Data di rilascio: 27/10/2011
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111028/333404d5/attachment-0001.html>
More information about the Tutor
mailing list