2022年 11月 9日 python数组求和与平均值 未分类 admin python数组求和与平均值 ls=[4,9,19,8,391,39,9,283,45] sum(ls) average=sum(ls)/len(ls) print('累加值',sum(ls),'平均值',average) 1 2 3 4 5