Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Triple quoted strings (multiline)

  • """
  • '''

If you would like to create a string that spreads on multiple lines, there is a possibility to put the text between 3 quotes on both sides. Either 23 single-quotes or 23 double-quotes.

text = """
Joe:        23
Jane:        7
Jacqueline  19
"""

print(text)

Joe:        23
Jane:        7
Jacqueline  19

Can spread multiple lines.

first row
second row
third row