$ cat triple.py
def foo():
print """this is a triple quoted string
this is a continuation of a triple quoted string"""
if __name__ == '__main__':
foo()
$ python triple.py
this is a triple quoted string
this is a continuation of a triple quoted string
This is really warty. In bash you can mostly get around this with <<- for here documents (which removes leading indentation, so even if you're defining a here doc at a place that itself is indented, you don't have to align the text to the left column yourself). The man page in my version suggests it only works for leading tabs, not spaces, though.e.g.
$ function usage() {
cat <<-END
this is a here document that
spans multiple lines and is indented
END
}
$ usage
this is a here document that
spans multiple lines and is indented
$