写函数,接收n个数字,求这些参数数字的和

1 def sum_func(*args):
2     total=0
3     for i in args:
4     return total
5 print(sum_func(1,2,3,8,23,6))
View Code

 

posted @ 2020-06-19 22:50  九州天空城  阅读(1294)  评论(0编辑  收藏  举报