Python 代码如下
def calculate_average(*args):
# 判断是否有传入参数
if not args:
return None
# 计算平均值
average = sum(args)
02-25
3983
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-21
3万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-10
411
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)