#-*-coding:utf-8-*- ''' 求和,接收n个数字(列表,不是考input的,求这些数字的和 ''' def sum_func(*args): total = 0 for i in args: total +=i return total print(sum_func(1,2,3))
Python(61)_函数练习(求和)
猜你喜欢
转载自www.cnblogs.com/sunnybowen/p/10257531.html
今日推荐
周排行