This has confused me for a long time. I can't understand why if "str" or "str2" in i:
is so glitchy. You don't even have to have either of those inputs for it to run the code in the if.
I'm asking if there is any way to get around this, and (optional) I would like to see why this happens.
Below is example script 1
i = input(">>> ")
if ";" in i:
print("Command")
else:
print("Nope")
>>> ;
Command
>>> da
Nope
Now for the buggy part I can't explain
i = input(">>> ")
if ";" or ":" in i:
print("Command")
>>> ;hello
Command
>>> anything
Command
>>> this doesn't have semicolon or colon, yet still says command.
Command
My IDE is IDLE, (most recent version) which creates the same output as the terminal running...