Commit 5ad1d8f3 by BellCodeEditor

save project

parent c67971f6
Showing with 17 additions and 14 deletions
total = []
while True:
unit= int(input("请输入:"))
if unit=='q':
break
else:
try:
unit_=int(unit)
except:
print("输入整数")
def asd():
total = []
while True:
unit=input("请输入:")
if unit=='q':
break
else:
total.append(unit)
print('-'*30)
print(total)
try:
unit_=int(unit)
except:
print("输入整数")
else:
total.append(unit_)
print('-'*30)
print(total)
return total
a=asd()
print(a)
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