Commit cf990812 by BellCodeEditor

save project

parent 02427168
Showing with 9 additions and 6 deletions
...@@ -2,10 +2,13 @@ def func(): ...@@ -2,10 +2,13 @@ def func():
total = [] total = []
while True: while True:
try: try:
unit= input("请输入:") unit= int(input("请输入:"))
except: except:
if unit== 'q': print("tmd")
break
else: else:
total.append(unit) if unit==0:
print(total) break
\ No newline at end of file else:
total.append(unit)
print(total)
func()
\ 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