Commit f493c8e3 by BellCodeEditor

auto save

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