sum() 求和用法

1 def func(*args):
2     # sum = 0
3     # for el in args:
4     #     sum += el
5     # return sum
6     return sum(args)    # sum() 求和
def func(*args):

return sum(args)
posted @ 2018-07-17 23:06  Niuli'blog  阅读(536)  评论(0编辑  收藏  举报