Commit 2c9967f3 by BellCodeEditor

save project

parent f7ea0540
Showing with 7 additions and 4 deletions
def aaa(): def aaa():
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入(q退出):")
if unit== 'q': if unit== 'q':
break break
else: else:
...@@ -11,7 +11,11 @@ def aaa(): ...@@ -11,7 +11,11 @@ def aaa():
print("请重新输入一个数字") print("请重新输入一个数字")
else: else:
total.append(unit) total.append(unit)
finally:
print("-"*30) print("-"*30)
print(total) return total
result = aaa()
print(total)
aaa()
\ 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