Light Mode
Dark Mode
Need some help!

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
Created: Sept. 2, 2023, 11:29 a.m.
Updated: Sept. 2, 2023, 11:49 a.m.
0
5
User avatar
py_invader