((In response to the above edit, this was not answered in the above link. The above question is irrelevant to my intended use.))
I have read a similar question about turning a string into lowercase;
How to convert string to lowercase in Python
I understand how this works perfectly, however my attempts at this myself have failed.
Here's my current setup example for a debug block;
#Debug block - Used to toggle the display of variable data throughout the game for debug purposes.
def debug():
print("Would you like to play in Debug/Developer Mode?")
while True:
global egg
choice = input()
if choice == "yes":
devdebug = 1
break
elif choice == "Yes":
devdebug = 1
break
elif choice == "no":
devdebug = 0
break
elif choice == "No":
devdebug = 0
break
elif choice == "bunny":
print("Easter is Here!")
egg = 1
break
else:
print("Yes or No?")
#
So, I have it prewritten to work with a different capitalization. However, I'd like to use only one if
statement per word rather than using two for the capitalization. I do have an idea, that uses another block to determine a True of False state, which would look like this;
def debugstate():
while True:
global devstate
choice = input()
if choice == "Yes":
devstate = True
break
elif choice == "yes":
devstate = True
break
elif choice == "No":
devstate = False
break
#Etc Etc Etc
But using this block would just take the lines of code I already have, and move it somewhere else. I know I could set it up that if it isn't 'Yes' then the else can automatically set devstate to 0, but I prefer to have a more controlled environment. I don't want to accidentally type 'yes ' with a space and have devmode off.
So back to the question;
How would I make it so I can just do the following?
def debug():
print("Debug Mode?")
while True:
global egg
choice = input()
if choice == "yes" or "Yes":
devdebug = 1
break
elif choice == "no" or "No":
devdebug = 0
break
elif choice == "egg":
devdebug = 0
egg = 1
print("Easter is Here")
break
else:
print("Yes or No?")
#
The above code probably isn't the best example, but it at least helps me get my point across when I say I only want one if
statement per word. (Also, I hope I didn't just solve my own problem here xD.)
So, how would I do this?
((Also, the reason I go here rather than the Python forums is because I prefer to ask my question in my own way rather than trying to piece together an answer from a question that was worded differently for someone else.))