Commit c09e7ac2 by BellCodeEditor

save project

parent 691980b0
Showing with 11 additions and 6 deletions
total = []
def newinput():
total=[]
while True:
unit= input("请输入:")
if unit== 'q':
return total
break
else:
try:
unit=int(unit)
total.append(unit)
int(unit)
except:
print("输入错误")
print(newinput())
print('wrong')
break
else:
int(unit)
total.append(unit)
print(total)
newinput()
\ No newline at end of file
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