In an attempt to make my if statements cleaner, I figured out a simply way of making them quite a lot shorter. Instead of doing this:
elif talk_in == "quit" or talk_in == "q" or talk_in == "exit" or talk_in == "x":
I can do this:
elif talk_in == ("quit" or "q" or "exit" or "x"):
However, it will only return true if the first item within the parentheses makes it true. For example:
>>> talkin = "quit"
>>> talkin == ("quit" or "q")
True
>>> talkin == ("q" or "quit")
False
Why does this happen? And how can I fix it?