<doocs>2299.Strong Password Checker II_1.py
def strongPasswordCheckerII( password: str) -> bool:
    if len(password) < 8:
        return False
    ans = 0
    for i, c in enumerate(password):
        if i and password[i - 1] == c:
            return False
        if c.islower():
            ans |= 1
        elif c.isupper():
            ans |= 2
        elif c.isdigit():
            ans |= 4
        else:
            ans |= 8
    return ans == 15
def sample_funcname ( var_0 : str ) -> bool :
    if len ( var_0 ) < 8 :
        return False
    var_7 = 0
    for var_9 , var_10 in enumerate ( var_0 ) :
        if var_9 and var_0 [ var_9 - 1 ] == var_10 :
            return False
        if var_10.islower ( ) :
            var_7 |= 1
        elif var_10.isupper ( ) :
            var_7 |= 2
        elif var_10.isdigit ( ) :
            var_7 |= 4
        else :
            var_7 |= 8
    return var_7 == 15
