def is_mandatory(err: str, words: list) ->bool:
    """
    This function checks whether a word containing the error string exists.
    :param err: error string
    :param words: list of words
    :return: whether the correction can be specified as mandatory
    """
    for word in words:
        if err in word:
            return False
    else:
        return True
