Commit 2368cd50 by BellCodeEditor

auto save

parent 9b72881e
Showing with 14 additions and 4 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:
try:
a=int(a)
except:
print('请输入一个数字')
else:
total.append(a) total.append(a)
print(total) finally:
wer() print('-'*30)
\ No newline at end of file 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