O'Reilly logo
  • Sri Harsha V thinks this is interesting:

It also allows multiline string literals enclosed in triple quotes (single or double)—when this form is used, all the lines are concatenated together, and end-of-line characters are added where line breaks appear. This is a minor syntactic convenience, but it’s useful for embedding things like multiline HTML, XML, or JSON code in a Python script, and stubbing out lines of code temporarily—just add three quotes above and below:

From

Cover of Learning Python, 5th Edition

Note

This is an useful feature that could be used while automatic document/code generation or editing.