-11

如何获得列表元素的总和?IE,

f = [1,8,3]
sum(f)=12?
4

1 回答 1

3

你猜对了, sum(f). 你为什么不试试?

>>> f = [1,8,3]
>>> sum(f)
 12
于 2013-04-10T16:00:08.773 回答