def check_valid_password_2(minimum, maximum, letter, password):
    """PART TWO

    Checks if a password is valid based on the criteria.
    The min/max in this example are actually the indexes
    (no index 0 here) of where the letter should occur.
    Only one occurence of the letter is acceptable (an "a")
    at both 1 and 3 won't work.
    """
    if (password[minimum-1] == letter and password[maximum-1] != letter
            or password[maximum-1] == letter and password[minimum-1] != letter):
        # print(minimum, maximum, letter, password)
        return True