Commit e837167e by BellCodeEditor

auto save

parent 024fb164
Showing with 7 additions and 6 deletions
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