python cookbook chapter 1