Commit e6810141 by BellCodeEditor

save project

parent 7a313754
Showing with 3 additions and 1 deletions
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
def sb(): def sb():
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入单价(cnm退出):")
if unit== 'cnm': if unit== 'cnm':
break break
else: else:
...@@ -12,5 +12,7 @@ def sb(): ...@@ -12,5 +12,7 @@ def sb():
print('输数字') print('输数字')
else: else:
total.append(unit) total.append(unit)
finally:
print('-'*30)
print(total) print(total)
sb() sb()
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