Commit 2104ac1e by BellCodeEditor

save project

parent c6ce2153
Showing with 14 additions and 13 deletions
try:
total = []
def A():
while True:
unit= input("请输入:")
if unit == 'q':
total = []
def A():
while True:
try:
unit= int(input("请输入:"))
except:
print('请输入数字')
else:
if unit == 1:
break
else:
total.append(int(unit))
except:
print("jkkpo")
else:
A()
print(total)
\ No newline at end of file
total.append(unit)
A()
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