题解 | #售罄的培根披萨#
售罄的培根披萨
http://www.nowcoder.com/practice/882bbffccbd44bc8b1db22a44e3ff8e8
NP39 售罄的培根披萨
思路:
step1:参考uu们的才知道是错题emm;
代码如下:
pizza_inventory=['bacon','durian','bacon','bacon','chicken','durian']
while('bacon' in pizza_inventory):
pizza_inventory.remove('bacon')
print('A pastrami order was deleted from list.')
if('bacon' not in pizza_inventory):
print('There is really no pastrami in sandwich_orders!')