Elif not working

Hi,
I’m am doing some code and it is ignoring the Elif statement and every input is coming out as True.
Can anyone help?

Code:

if adtools == "y" or "Y" or "Yes" or "yes":
  adtoolsa = True
  print("Ok, Please enter the pin.")
  adpin = input(">>: ")
elif adtools == "n" or "N" or "No" or "no":
  adtoolsa = False
  print("Okay, We will continue with basic user settings and tools.")
else:
  print("Not a valid option.")

output:

>>: m
Ok, Please enter the pin.
>>:
Or:
>>: N
Ok, Please enter the pin.
>>:

What I want to happen:

>>: N
Okay, We will continue with basic user settings and tools
>>:

Please someone help!!!

Python cares about indentation, and it’s hard to debug this without seeing it. Can you edit or re-post this code in a formatted block (use three ticks, ```, above and below, and check the preview to make sure it looks right)?

Sorry I don’t understand what you mean by this.

This:

if adtools == "y" or "Y" or "Yes" or "yes":

is treated as:

if (adtools == "y") or "Y" or "Yes" or "yes":

Non-empty strings are treated as true, so that’s equivalent to:

if (adtools == "y") or True or True or True:

It’s always true!

The neatest way of checking for “y” or “yes” in a case-insensitive way is:

if adtools.lower() in {"y", "yes"}:

Please also see:

Maybe this is what you’re looking for:

adtools = input("Yes or No: ").upper()

if adtools in ('Y', 'N', 'YES', 'NO'):
    if adtools == 'Y' or adtools == 'YES':
        print("Ok, Please enter the pin.")
        adpin = input(">>: ")
    elif adtools == 'N' or adtools == 'NO':
        print("Okay, We will continue with basic user settings and tools.")
else:
    print("Not a valid option.")

Thank you so much, this has worked!