Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Hands on the textwrap Module in Python

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

import textwrap

textwrap.dedent

s = """\
    if [[ -f ... ]]; then
        echo
    fi
    """
print(textwrap.dedent(s))
if [[ -f ... ]]; then
    echo
fi