textwrap.TextWrapper.fill

TextWrapper.fill(text : string) → string[source]

Reformat the single paragraph in ‘text’ to fit in lines of no more than ‘self.width’ columns, and return a new string containing the entire wrapped paragraph.