题解 | #售罄的培根披萨#
售罄的培根披萨
https://www.nowcoder.com/practice/882bbffccbd44bc8b1db22a44e3ff8e8
#题目出错
#输出应该是
#print('A pastrami order was deleted from list.')
#print('There is really no pastrami in sandwich_orders!')
#输出应该是
#print('A pastrami order was deleted from list.')
#print('There is really no pastrami in sandwich_orders!')
pizza_inventory=['bacon','durian','bacon','bacon','chicken','durian']
while True:
if 'bacon' in pizza_inventory:
pizza_inventory.remove('bacon')
print('A pastrami order was deleted from list.')
else:
print('There is really no pastrami in sandwich_orders!')
break
查看7道真题和解析