Commit a3fad2e0 by BellCodeEditor

save project

parent bcb4ed87
Showing with 7 additions and 4 deletions
...@@ -5,11 +5,14 @@ def lb(): ...@@ -5,11 +5,14 @@ def lb():
if unit== 'q': if unit== 'q':
break break
else: else:
try try:
unit=int(unit) unit=int(unit)
except: except:
print("请输入一个整数") print("请输入一个整数")
else: else:
total.append(unit) total.append(unit)
print(total) finally:
lb() print("-"*30)
\ No newline at end of file return total
e1=lb()
print(e1)
\ 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