Commit e837167e by BellCodeEditor

auto save

parent 024fb164
Showing with 7 additions and 6 deletions
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
total = []#总的价格
while True:#重复执行
unit= input("请输入:")#输入价格
if unit== 'q':#如果输入是q
break#退出循环
else:
total.append(unit)
total.append(unit)列表里追加新元素
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