from pip._vendor.distlib.compat import raw_input
Inventory1 = ["Rice", "Maze", "Oil", "Toothpaste", "Beans", "Cloth", "Pepper"]
print("Here are present items list information:", Inventory1)
CheckInv1 = input('Is this item present in the inventory: \n')
for CheckInv1 in Inventory1:
if CheckInv1 == ("Rice", "Maze", "Oil", "Toothpaste", "Beans", "Cloth", "Pepper"):
print("This item is present in the inventory list.")
break
else:
print("User entered item is not present in the list.")
break
Question: Even enter "Oil" text in code input, its still showing else print statement. If statement is not compared. Any suggestions. Thanks
CheckInv1isn't the tuple you are comparing it to; it may be contained in the tuple, though. You wantin, not==.