Commit 58bf46ca by BellCodeEditor

auto save

parent 2c8ba7fb
Showing with 11 additions and 0 deletions
total = [] # 列表total
def gettotal():# 定义收集价格函数
while True:
unit = input("请输入价格:") # 输入价格,并收集到 unit
if unit == 'Q' : # 如果输入"Q",则退出
break
else:
total.append(unit) # 否则加入到列表
print(total)
gettotal()
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