Commit dbe856d2 by BellCodeEditor

save project

parent b2655eff
Showing with 8 additions and 4 deletions
...@@ -2,8 +2,12 @@ def a(): ...@@ -2,8 +2,12 @@ def a():
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': try:
break if unit== 'q':
break
else:
total.append(unit)
except:
print("输入整数")
else: else:
total.append(unit) print(total)
print(total)
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