Using the built-in textwrap module.

Dedent

Remove common whitespace.

text = textwrap.dedent("""\
    a
      b
    c
""")
print(text)
a
  b
c