a=[40,120,30,95.4,105.9,83] sum=0 for i in a: sum+=i print(sum) 运行结果如下(不明白怎么最后两行怎么那样了 (顺便纪念一下人生第一篇博客:)