def _endswith(expr, pat):
    """
    Return boolean sequence or scalar indicating whether each string in the sequence or scalar
    ends with passed pattern. Equivalent to str.endswith().

    :param expr:
    :param pat: Character sequence
    :return: sequence or scalar
    """

    return _string_op(expr, Endswith, output_type=types.boolean, _pat=pat)
Return boolean sequence or scalar indicating whether each string in the sequence or scalar
    ends with passed pattern. Equivalent to str.endswith().

    :param expr:
    :param pat: Character sequence
    :return: sequence or scalar