Commit 04df2172 by BellCodeEditor

auto save

parent 859dc0e6
Showing with 17 additions and 0 deletions
def new_input():
age_list = []
while True:
age = input("请输入")
if age == 'q':
break
else:
try:
age = int(age)
except:
print("请输入数字哦")
else:
age_list.append(age)
print('-'*30)
return age_list
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