O'Reilly logo
  • Chris Kang 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:


Cover of Learning Python, 5th Edition


"""abc""" keeps the formatting as typed between tripple quotes.