擅长:python、mysql、java
<p>像这样:!?你知道吗</p>
<pre><code>lst=[['year', 'month', 'date_of_month', 'day_of_week', 'births'],
['1994', '1', '1', '6', '8096'],
['1994', '1', '2', '7', '7772'],
['1994', '1', '3', '1', '10142'],
['1994', '1', '3', '1', '10']
]
d={}
for e in lst:
if e[3].isdigit():
if e[3] in d:
d.update({e[3]:d[e[3]]+int(e[4])})
else:
d.update({e[3]:int(e[4])})
for e in d:
print e, d[e]
</code></pre>