I'm building a program that replicates drawing from a deck of playing cards with custom suits (still a 52 card deck otherwise). I'm having an issue where any input other than one of the higher options triggers my quit option instead despite it not being my else. Here's a condensed form of my list. I'm self taught, so I might not know if I'm breaking some rule or not, but regardless of my input for menu whether null or any other character, unless its 1-6 it triggers the quit() instead of hitting the else. Please help!
menu = input("1-6:")
if menu == '1': # make a new deck and clear draw pile
...
elif menu == '6': #put all cards back
replace(len(drawn))
elif menu == 'Q' or 'q': #quit
print("Have a good one!")
quit()
else:
print("That's not an option!")
I changed it to 7 triggering the quit statement instead of the letter q and it worked. I really just want to know why it did this since I can't seem to grasp the problem well enough to google it on my own. Was it because the inputs were numbers or letters somehow? Was it the or instead of using the cleaner .lower option?
I'm am a confusion.