Use conditional statement to achieve this:
cheese = 1
sausage = 3
tomato = 3
while cheese > 0 or sausage > 0 or tomato > 0:
print("Cheese stock:")
print(cheese)
print("Sausage stock:")
print(sausage)
print("Tomato stock:")
print(tomato)
if cheese > 0:
cheese -=1
if sausage > 0:
sausage -=1
if tomato > 0:
tomato -=1
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…