Commit c4a4e731 by BellCodeEditor

save project

parent 785023ff
Showing with 10 additions and 9 deletions
def max1(): def new():
total=[] total=[]
while True: while True:
unit= int(input("请输入:")) unit= input("请输入:")
if unit== 'q': if unit== 'q':
break break
else: else:
try: try:
total.append(unit) unit=int(unit)
except: except:
print("wrong") print("wrong,again!")
else: else:
print(total) total.append(unit)
finally: # finally:
print() # print("-"*30)
return total return total
print(max1()) re = new()
print(re)
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