def remove(self, expr):
        """Remove a provided expression from its list of contents.

        :param Union[TexExpr,str] expr: Content to add
        :return: index of the expression removed
        :rtype: int

        >>> expr = TexExpr('textbf', ('hello',))
        >>> expr.remove('hello')
        0
        >>> expr
        TexExpr('textbf', [])
        """
        self._assert_supports_contents()
        index = self._contents.index(expr)
        self._contents.remove(expr)
        return index
Remove a provided expression from its list of contents.

        :param Union[TexExpr,str] expr: Content to add
        :return: index of the expression removed
        :rtype: int

        >>> expr = TexExpr('textbf', ('hello',))
        >>> expr.remove('hello')
        0
        >>> expr
        TexExpr('textbf', [])