Commit 2c8ba7fb by BellCodeEditor

auto save

parent 024fb164
Showing with 6 additions and 6 deletions
total = [] total=[] # 定义一个列表total 收集价格
while True: while True:
unit= input("请输入:") unit = input("请输入价格:") # 输入价格,并收集到
if unit== 'q': if unit== "Q" : # 如果输入""Q"
break break
else: else:
total.append(unit) total.append(unit) # 否则加入到列表
print(total) print(total)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment