All of the Python code from the book is available in this code archive.
Shhh, my code for all of the book’s suggested exercises is in there, too. But please try the exercises on your own first before looking at my code.