'My python code in my if statement will run even when false [duplicate]
My code
yes = input("my input: ")
if yes == "yes" or "yEs" or "yeS" or "Yes" or "YEs" or "YES" or "yES" or "YeS" or "Y" or "y":
print("correct")
The shell: When true:
my input: yes
correct
When false:
my input: no
correct
what is going on here!!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
