# Python-有没有办法提出相同系列的问题并存储每组答案直到用户完成？

``````while brand != ''
brand = str(input('Enter a brand of chapstick you use: '))
brand = brand.title()
brand_cost = float(input('How much does', brand, 'chapstick cost? \$'))
brand_quantity = int(input('How many', brand, 'chapstick(s) do you own? '))
brand_regularly = int(input('How many', brand, 'chapsticks do you finish per year? '))
brand_since = int(input('At what age did you first buy', brand, 'Chapstick? '))
``````

uqui

``````prices = []
quantity = []
per_year = []
since = []

while True:
brand = str(input('Enter a brand of chapstick you use: '))
brand = brand.title()
brand_cost = float(input('How much does ' + brand + ' chapstick cost? \$'))
brand_quantity = int(input('How many ' + brand + ' chapstick(s) do you own?'))
brand_regularly = int(input('How many' + brand + ' chapsticks do you finish per year? '))
brand_since = int(input('At what age did you first buy' + brand + 'Chapstick? '))
prices.append(brand_cost)
quantity.append(brand_quantity)
per_year.append(brand_regularly)
since.append(brand_since)
is_complete = str(input('Is that all (y/n)'))
if is_complete == 'y':
break
elif is_complete == 'n'
continue

``````