I want to take the user's input (an integer) and use it to multiply the 3rd argument in a list. I don't know how to go about this with the code i have currently:
def add_cart():
cart_YorN = ""
while cart_YorN not in ("y", "n"):
cart_YorN = input("\nWould you like to add this item to your cart? ")
if cart_YorN == "y":
multiply = int(input("Okay, how many of this item would you like? \n")) #multiply is the variable that will carry the multiplication value
receipt_list.#????? #not sure what to do here
receipt.list is the list which contains 3 arguments and i want the third one to be multiplied by "multiply". Also, once this has been multiplied, will this update the list?
result = receipt_list[2] * multiply