math_sumlist.py 109 B

123456
  1. # 计算序列的和
  2. def sumlist(nums):
  3. total = 0
  4. for n in nums:
  5. total += n
  6. return total