要求:遍历列表sandwich_order,删除其中所有'fish sandwich',重新打印列表sandwich_order
sandwich_order=['fish sandwich','beef sandwich','meat sandwich',
'fish sandwich','fish sandwich']
while sandwich_order:
sandwich_order.remove('fish sandwich')
print(sandwich_order)
为什么老是显示ValueError: list.remove(x): x not in list报错?谢谢。