执行代码
countsum = [163, 211, 121, 46, 11] sumrate= countsum for i in sumrate: i /= total print(i) print("sum rate is "+str(sumrate))
得到结果
0.29528985507246375
0.3822463768115942
0.21920289855072464
0.08333333333333333
0.019927536231884056
sum rate is [163, 211, 121, 46, 11]
python初学,不太懂这是什么原理,怎么改,谢谢
米脂
相关分类