The string I am writing is very long. To make it easier to read, I would like to wrap the text onto multiple lines. How is this done. I have read the instructions before but cannot locate them now.
31 Answer
[This answer applies to Python in general and is not specific to IDLE.]
For input of long strings without embedded newlines, you could enter a multiline string and then delete the newlines. But if you want lines to end with spaces after commas and periods, you will not see them and they will disappear if you strip line-ending whitespace from your code. (This is required for CPython stdlib code.)
An alternative is to use Python's string literal concatenation feature. White space is guarded by line-ending quotes, and comments can be added. (See the link for another example.)
stories = { 'John' : "One day John went to the store to buy a game. " # the lead "The name of the game was Super Blaster. " # the hint "On the way to the store, John was blasted by a purple ray. " "The ray of purple light, mixed with super neutrinos, " "came from a alien spaceship hovering above." } import textwrap print('\n'.join(textwrap.wrap(stories['John']))) # prints One day John went to the store to buy a game. The name of the game was Super Blaster. On the way to the store, John was blasted by a purple ray. The ray of purple light, mixed with super neutrinos, came from a alien spaceship hovering above. 2