Error while using index value for list in for loop

后端 未结 0 1661
有刺的猬
有刺的猬 2020-12-05 15:54

I want to calculate the total price.

price=[20, 40, 50, 90]
for i in range(len(price)):
    cost+=price[i]
print("The Total sum of the Price is= "+s         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题