Commit 87eb27bd by BellCodeEditor

save project

parent e6810141
Showing with 7 additions and 4 deletions
def sb(): def sb():
total = [] md = []
while True: while True:
unit= input("请输入单价(cnm退出):") unit= input("请输入单价(cnm退出):")
if unit== 'cnm': if unit== 'cnm':
...@@ -11,8 +11,10 @@ def sb(): ...@@ -11,8 +11,10 @@ def sb():
except: except:
print('输数字') print('输数字')
else: else:
total.append(unit) md.append(unit)
finally: finally:
print('-'*30) print('-'*30)
print(total) print(md)
sb() return md
nmd = sb()
print(nmd)
\ 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