def wrap ( s , width = 80 ) : return '\n' . join ( textwrap . wrap ( str ( s ) , width = width ) )
text wrap on python with raw input
Formats the text input with newlines given the user specified width for each line .
def wrap(s, width=80):
    """
    Formats the text input with newlines given the user specified width for
    each line.

    Parameters
    ----------

    s : str
    width : int

    Returns
    -------

    text : str

    Notes
    -----

    .. versionadded:: 1.1

    """
    return '\n'.join(textwrap.wrap(str(s), width=width))