Commit d6e3dbcc by BellCodeEditor

save project

parent 95752dd4
Showing with 5 additions and 5 deletions
...@@ -3,7 +3,7 @@ def new_input(): ...@@ -3,7 +3,7 @@ def new_input():
while True: while True:
unit= input('请输入单价(q退出) : ') unit= input('请输入单价(q退出) : ')
if unit=='q': if unit=='q':
breakq break
else: else:
try: try:
unit= int(unit) unit= int(unit)
...@@ -13,7 +13,7 @@ def new_input(): ...@@ -13,7 +13,7 @@ def new_input():
total.append(unit) total.append(unit)
finally: finally:
print("-"*30) print("-"*30)
print(total) return(total)
new_input() result = new_input()
print(result)
\ No newline at end of file \ 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