def check_chars_in_positions(password, left, right, in_char):
    """
    Check if password is valid based on if char count is in exactly one of
    position left or position right

    returns bool (True = valid password)
    """

    is_in_left = password[left-1] == in_char
    is_in_right = password[right-1] == in_char

    # need to xor the two
    return is_in_left != is_in_right