Commit 3b147589 by BellCodeEditor

save project

parent 8dab391f
Showing with 13 additions and 9 deletions
total = []
def func(): def func():
total = []
while True: while True:
try: try:
unit=int(input("请输入:")) unit=input("请输入:")
a=int(unit)
except: except:
print("重输,笨蛋") if unit=='q':
else:
if unit== 'q':
break break
else: else:
total.append(unit) print("重输,笨蛋")
print(total) else:
func() if unit=='q':
\ No newline at end of file break
total.append(a)
return total
total=func()
print(total)
\ No newline at end of file
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