Commit abe91f3d by BellCodeEditor

save project

parent 527c3c52
Showing with 8 additions and 2 deletions
def func():d def func():
total = [] total = []
while True: while True:
...@@ -6,6 +6,11 @@ def func():d ...@@ -6,6 +6,11 @@ def func():d
if unit== 'q': if unit== 'q':
break break
else: else:
total.append(unit) try:
x=int(unit)
except:
print("重输")
continue
total.append(x)
print(total) print(total)
func() 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