textwrapper Wraps your text files to a given width (defaults to 72), without breaking words. I use it to format AoC problems to python docstrings for my solutions repo. I also use it for Daily Byte. Installation pip install textwrapper Usage textwrap path/to/file