Commit 2f471454 by BellCodeEditor

auto save

parent fcbe0259
Showing with 13 additions and 3 deletions
...@@ -3,11 +3,21 @@ def new_imput(): ...@@ -3,11 +3,21 @@ def new_imput():
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': if unit== 'q':
break break
else: else:
total.append(unit) try :
print(total) unit= int(unit)
except:
print("输入数字")
else:
total.append(unit)
finally:
print("-"*30)
return total
result=new_imput()
print(result)
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