Commit 93135111 by BellCodeEditor

save project

parent cf5034af
Showing with 6 additions and 4 deletions
total = [] # total = []
def a(): def new_input():
total = []
while True: while True:
unit= input("请输入一个数字(退出请输入q)") unit= input("请输入一个数字(退出请输入q)")
if unit== 'q': if unit== 'q':
...@@ -12,8 +13,9 @@ def a(): ...@@ -12,8 +13,9 @@ def a():
else: else:
total.append(unit) total.append(unit)
return total return total
a()
print(total) result=new_input()
print(result)
......
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