Commit f493c8e3 by BellCodeEditor

auto save

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