# Created on savesnippets.com · https://savesnippets.com/oQD5x4Scg1ruEA import textwrap def help_text() -> str: return textwrap.dedent("""\ myapp 1.0 ========= Usage: myapp [-v|--verbose] command [options] Commands: run — start the server stop — graceful shutdown """) print(help_text()) # Wrap a long paragraph to 60 cols para = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt." print(textwrap.fill(para, width=60))