You are viewing a single comment's thread. Return to all comments →
Try this:
product = [] quantity1 = [] print(product) while 1: products = input("Enter the product name: ") print(products) if products == 'exit': break product.append(products) quantity = input("Enter the quantity of products: ") print(quantity) quantity1.append(quantity)
for x in range(0,len(product)): print("you have %s number of %s"%(quantity1[x],product[x]))
Seems like cookies are disabled on this browser, please enable them to open this website
Say "Hello, World!" With Python
You are viewing a single comment's thread. Return to all comments →
Try this:
product = [] quantity1 = [] print(product) while 1: products = input("Enter the product name: ") print(products) if products == 'exit': break product.append(products) quantity = input("Enter the quantity of products: ") print(quantity) quantity1.append(quantity)
for x in range(0,len(product)): print("you have %s number of %s"%(quantity1[x],product[x]))