Commit cf990812 by BellCodeEditor

save project

parent 02427168
Showing with 6 additions and 2 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")
else:
if unit==0:
break break
else: else:
total.append(unit) total.append(unit)
print(total) 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