def format_h1(s, format="text", indents=0):
    """
    Encloses string in format text

    Args:
        s: string
        format: string starting with "text", "markdown", or "rest"
        indents: number of leading intenting spaces

    Returns: list

    >>> print("\\n".join(format_h2("Header 1", indents=10)))
              Header 1
              --------

    >>> print("\\n".join(format_h2("Header 1", "markdown", 0)))
    ## Header 1
    """

    _CHAR = "="
    if format.startswith("text"):
        return format_underline(s, _CHAR, indents)
    elif format.startswith("markdown"):
        return ["# {}".format(s)]
    elif format.startswith("rest"):
        return format_underline(s, _CHAR, 0)
def format_h1 ( s , format = "text" , indents = 0 ) : _CHAR = "=" if format . startswith ( "text" ) : return format_underline ( s , _CHAR , indents ) elif format . startswith ( "markdown" ) : return [ "# {}" . format ( s ) ] elif format . startswith ( "rest" ) : return format_underline ( s , _CHAR , 0 )
Encloses string in format text

    Args:
        s: string
        format: string starting with "text", "markdown", or "rest"
        indents: number of leading intenting spaces

    Returns: list

    >>> print("\\n".join(format_h2("Header 1", indents=10)))
              Header 1
              --------

    >>> print("\\n".join(format_h2("Header 1", "markdown", 0)))
    ## Header 1