python数组求和与平均值

python数组求和与平均值

ls=[4,9,19,8,391,39,9,283,45]
sum(ls)
average=sum(ls)/len(ls)
print('累加值',sum(ls),'平均值',average)

发布了10 篇原创文章 · 获赞 0 · 访问量 50

猜你喜欢

转载自blog.csdn.net/weixin_44220805/article/details/105306066
今日推荐