triple-quoted string

A string literal written between three quote marks, ''' or """, which can span several lines.

In more detail

Line breaks inside it become part of the string, so it is handy for long text such as a mad lib story or a web page template. Docstrings are normally triple-quoted.

Example

story = """Once upon a time
there was a {animal}."""

Related terms

Taught in

References

Certification courses