Python has many options for formatting strings and text, including f-strings, format() function, etc. There's however one module that few people know about and it's called textwrap. It is to help you with line-wrapping, indentation, trimming, etc. @martinheinz covered this interesting module in this article with amazing examples.