Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Quick recap
3. Multiline strings
Indexing and slicing


Good job! If you have a very long string variable, here's a nice trick to put it on multiple lines:

fairy_tale = ('Once upon a time, there was an old lady. '
  'She was no longer happy with her life. '
  'Her husband and children were all dead. '
  'She needed something to help her feel alive again. '
  'That is why she started learning Python.')

Note that each line of the fairy_tale variable is surrounded by quotes. Moreover, all the lines together are enclosed in a single pair of parentheses.

When you print the variable, you will see its components printed on a single line without line breaks.


Store the following sentence by F. Scott Fitzgerald in a variable named long_passage:

Its vanished trees, the trees that had made way for his house, had once pandered in whispers to the last and greatest of all human dreams; for a transitory enchanted moment man must have held his breath in the presence of this continent, compelled into an aesthetic contemplation he neither understood nor desired, face to face for the last time in history with something commensurate to his capacity for wonder.

Stuck? Here's a hint!

Organize the passage into multiple lines and remember about the pair of parentheses.