Commit bed20126 by BellCodeEditor

save project

parent 9b7026e6
Showing with 10 additions and 6 deletions
total=[] total=[]
def d(): def d():
while True: while True:
tunit=int(inpu("请输入:")) tunit=input("请输入:")
if unit== 'q': if tunit == 'q':
break break
else: else:
try: try:
tunit=int(tunit)
except: except:
print("请输入整数") print("请输入整数")
else: else:
total.append(tunit)
print("已经加入") print("已经加入")
print(total) print(total)
return total
d()
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