import time
x = input("Buy Eggs? (Y/N) ")
if x.lower().strip() == "yes" or "y":
print("Buy Eggs")
time.sleep(0.5)
print("You bought eggs")
elif x.lower().strip() == "no" or "n":
print("Don't buy eggs")
time.sleep(.5)
print("You don't have eggs")
What I want to happen is to allow multiple words to be inputted for one if
command. I thought it'd work but instead of working it would prioritize the top piece of code.
Buy Eggs? (Y/N) n #<--- Answer#
Buy Eggs
You bought eggs
Process finished with exit code 0
It only seems to work if I remove the or
command but I haven't found any other options to allow multiple optional inputs.
Thank you if you do choose to help me