Commit 828b24d0 by BellCodeEditor

save project

parent d4832176
Showing with 6 additions and 8 deletions
def new_inpot():
total=[]
while True:
try:
unit=input("请输入")
except:
print("不是数字")
if unit=="q":
break
else:
total.append(unit)
try:
unit=int(unit)
except:
print("重输")
else:
total.append(unit)
print(total)
new_inpot()
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