Executable Python programs on Linux and Mac

On Mac or Linux, we must mark our script as executable using the chmod command before the shebang will have any effect:

$ chmod +x words.py

Having done that, we can now run our script directly:

$ ./words.py http://sixty-north.com/c/t.txt