textwrap.wrap()

textwrap.wrap(text, width=70, **kwargs)

Wraps the single paragraph in text (a string) so every line is at most width characters long. Returns a list of output lines, without final newlines.

Optional keyword arguments correspond to the instance attributes of TextWrapper, documented below. width defaults to 70.

See the TextWrapper.wrap() method for additional details on how wrap() behaves.

doc_python
2016-10-07 17:44:30
Comments
Leave a Comment

Please login to continue.