在我的标题中,我的意思是:
myCellar = ["doritos", "chips", "chocolates", ""]
productsInDemand = input("Write a product : ")
for supply in myCellar :
if productsInDemand == supply:
print("This product we have : '",productsInDemand ,"'")
break
else:
print("This product we have not : '",productsInDemand ,"'")
(go back to the line 1)
如果我要编写一个在“mycellar”中不存在的产品,那么程序将返回第一行再次编写产品。