Commit 9d87982b by BellCodeEditor

save project

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