Commit 88b916e1 by BellCodeEditor

save project

parent 692ff17b
Showing with 11 additions and 3 deletions
def a():
def abc():
total=[]
while True:
unit=input('请输入')
if unit=='q':
break
try:
unit=int(unit)
except:
print('要输入一个整数')
else:
total.append(unit)
print(total)
a()
\ No newline at end of file
return total
a=abc()
print(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