So I coded a function that takes the value of a batteries variable. I want it to do something if the value is "yes" or "no". If the value is none of these answers, I want it to to ask it again for an indefinite amount of times. Here is my code in case my description was bad.
def batterie_answer():
batteries = raw_input("yes or no > ").lower()
print batteries
while True:
if batteries != "yes" or batteries != "no":
print "Please respond yes or no"
raw_input("> ")
continue
elif batteries == "yes":
print "batteries taken!"
items["batteries"] = 1
break
elif batteries == "no":
print "Probably a wise choice. Save some space!"
break
batterie_answer()