Commit 39e44953 by BellCodeEditor

save project

parent 61e69d69
Showing with 9 additions and 5 deletions
...@@ -2,9 +2,12 @@ def a(): ...@@ -2,9 +2,12 @@ def a():
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': if unit== 'q':
break break
else: try:
total.append(unit) b = int(unit)
print(total) finally total.append(unit):
pass
else:
print(total)
a() a()
\ 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