textwrap.TextWrapper.wrap¶
-
TextWrapper.wrap(text : string) → [string][source]¶ Reformat the single paragraph in ‘text’ so it fits in lines of no more than ‘self.width’ columns, and return a list of wrapped lines. Tabs in ‘text’ are expanded with string.expandtabs(), and all other whitespace characters (including newline) are converted to space.