Commit dc77e009 by BellCodeEditor

save project

parent 17a12605
Showing with 11 additions and 6 deletions
def new_input(): def new_input():
total = [] total = []
while True: while True:
try: unit= input("请输入:")
unit= int(input("请输入:"))
except: if unit== 'q':
#if unit== 'q':
break break
else: else:
try:
unit=int(unit)
except:
unit= input("请输入:")
else:
total.append(unit) total.append(unit)
return total return total
print(total) print(new_input())
new_input()
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