Let's start with the snippet we worked with in Chapter 2, Strings and Collections. Open a text editor – preferably one with syntax highlighting support for Python – and configure it to insert four spaces per indent level when you press the tab key. You should also check that your editor saves the file using the UTF 8 encoding as that's what the Python 3 runtime expects by default.
Create a directory called pyfund in your home directory. This is where we'll put the code for the chapter.
All Python source files use the .py extension, so let's get the snippet we wrote at the REPL at end of the previous module into a text file called pyfund/words.py. The file's contents should looks like this:
from urllib.request import urlopen
with urlopen('http://sixty-north.com/c/t.txt') as story:
story_words...