Commit dc77e009 by BellCodeEditor

save project

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