Commit cf5034af by BellCodeEditor

save project

parent f493c8e3
Showing with 4 additions and 4 deletions
total = []
def a(): def a():
total = []
while True: while True:
unit= input("请输入") unit= input("请输入一个数字(退出请输入q)")
if unit== 'q': if unit== 'q':
break break
else: else:
...@@ -11,9 +11,9 @@ def a(): ...@@ -11,9 +11,9 @@ def a():
print('要输入整数啊') print('要输入整数啊')
else: else:
total.append(unit) total.append(unit)
print(total) return total
a() a()
print(total)
......
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