Commit a1626e7a by BellCodeEditor

auto save

parent a6bd827c
Showing with 4 additions and 3 deletions
...@@ -2,7 +2,7 @@ def new_input(): ...@@ -2,7 +2,7 @@ def new_input():
total=[] total=[]
while True: while True:
unit=input("请输入:") unit=input("请输入:")
if unit=="q": z if unit=="q":
break break
else: else:
try: try:
...@@ -11,7 +11,7 @@ def new_input(): ...@@ -11,7 +11,7 @@ def new_input():
print('请输入整数') print('请输入整数')
else: else:
total.append(int(unit)) total.append(int(unit))
print(total)
return total return total
new_input()
total=new_input()
print(total) print(total)
\ 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