In this section, we will learn about the textwrap Python module. This module provides the TextWrapper class that does all the work. The textwrap module is used for formatting and wrapping plain text. This module provides five main functions: wrap(), fill(), dedent(), indent(), and shorten(). We are going to learn these functions one by one now.