Commit a1da1aed by BellCodeEditor

save project

parent 72505662
Showing with 7 additions and 5 deletions
def new_input():
total = []
while True:
unit= input("请输入:")
u= input("请输入:")
try:
int(unit)
p=int(u)
except:
if unit== 'q':
if u== 'q':
break
else:
print("输入错误")
else:
total.append(unit)
continue
print(type(p))
total.append(p)
print(total)
new_input()
\ 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