Commit 2368cd50 by BellCodeEditor

auto save

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