PizzaChange=float(input("What would you like the new price for all standard pizzas to be? "))
PriceList[0][1][2][3][4][5][6]=[PizzaChange]
PriceList[7][8][9][10][11]=[PizzaChange+3]
Basically I have an input that a user will put a number values (float input) into, then it will set all of these aforementioned list indexes to that value. For some reason I can't get it to set them without coming up with a:
TypeError: 'float' object is not subscriptable
error. Am I doing something wrong or am I just looking at it the wrong way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…