Finished chapter 1 of python-cookbook