In the code below, the if statement is triggering no matter the condition satisfies or not. the problem is with 'or' or anything else i do not know. please help
while True:
q = input("WRITE:")
if 'a' or 'b' in q:
print("yes")
else:
print("no")
I saw some fix about it like applying parenthesis i.e
while True:
q = input("WRITE:")
if('a') or ('b') in q:
print("yes")
else:
print("no")
but this is also triggering no matter the condition satisfies or not.
I also tried this
while True:
q = input("WRITE:")
if('a' or 'b') in q:
print("yes")
else:
print("no")
but this also did not work please help me. how to fix it