• Need some help!

Question related to mission Acceptable Password VI

 

Hello everyone,

I'm writing this post because I'm struggling to fix my code and add the next clause to complete the exercise. If someone with more experience could lend a hand, I would be incredibly grateful!

CODE:

def is_acceptable_password(password: str) -> bool:

    not_password = 'password' not in password.lower()

    if len(password) > 6 and any(map(str.isdigit, password))\
        and any(map(str.isalpha, password))\
            and not_password: return True

    elif len(password) > 9 and not_password: return True

    elif len(set(password)) > 2:
        return True

    else:
        return False