擅长:python、mysql、java
<p>稍有不同的方式:</p>
<pre><code>score = [
['5.00', '4.30', '2.50', '3.60', '1.30', '5.00'],
['80.00', '8.00', '32.00', '13.60', '20.00', '80.00'],
['12.00', '6.00', '7.20', '8.40', '9.60', '12.00'],
['3.00', '1.20', '2.04', '1.08', '0.84', '3.00']
]
def sum_same_elements(l):
l_float = [map(float, lst) for lst in l]
to_sum = []
for i in range(len(l[0])):
lst_at_index = []
for lst in l_float:
lst_at_index.append(lst[i])
to_sum.append(lst_at_index)
return map(sum, to_sum)
print sum_same_elements(score)
</code></pre>