Commit d56ac37f by BellCodeEditor

save project

parent a5666546
Showing with 18 additions and 12 deletions
total = []
def new_input():
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
total.append(unit)
print(total)
def new_input():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print('重新输入整数')
else:
total.append(unit)
finally:
print('-'*30)
return total
result=new_input()
print(result)
def new_1():
print("123")
input("请输入姓名 ")
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