Commit 782a7ea5 by BellCodeEditor

save project

parent 51458ba9
Showing with 11 additions and 10 deletions
def new_input():
a=[]
while True:#获取输入内容
x=input('输入,q退')#如果输入的是q
if x=='q':
b=[]
while True:
a=input('输入,q退')
if a=='q':
break
else:
try:
x=int(x)
a=int(a)
except:
print('重输')
except:
a.append(x)
else:
b.append(a)
finally:
print('-'*30)
print(a)
new_input()
return b
result=new_input()
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