list - Python prints statement for each line in txt file -


i want take user's input (an integer) , use multiply 3rd argument in list. don't know how go code have currently:

def add_cart():     cart_yorn = ""     while cart_yorn not in ("y", "n"):         cart_yorn = input("\nwould add item cart? ")         if cart_yorn == "y":             multiply = int(input("okay, how many of item like? \n")) #multiply variable carry multiplication value             receipt_list.#?????  #not sure here 

receipt.list list contains 3 arguments , want third 1 multiplied "multiply". also, once has been multiplied, update list?

result = receipt_list[2] * multiply 

Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -