Commit 9d87982b by BellCodeEditor

save project

parent 2b7b469b
Showing with 8 additions and 4 deletions
def func() try:
unit= input("请输入:")
def func():
total = [] total = []
while True: while True:
unit= input("请输入:") input("请输入:")
if unit== 'q': if unit== 'q':
break
else:
total.append(unit) total.append(unit)
break
except:
print("你输入的不是整数")
else:
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