Commit 2368cd50 by BellCodeEditor

auto save

parent 9b72881e
Showing with 15 additions and 5 deletions
\ No newline at end of file
def wer(): def wer():
total=[] total=[]
while True: while True:
a=input("请输入") a=input("请输入单价(q退出)")
if a=='q': if a=='q':
break break
else: else:
total.append(a) try:
print(total) a=int(a)
wer() except:
\ No newline at end of file print('请输入一个数字')
else:
total.append(a)
finally:
print('-'*30)
return total
aa = wer()
print(aa)
\ 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