Commit 5ad1d8f3 by BellCodeEditor

save project

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