Read online: Chapter 18 - Collision Detection and Input
Download source: collisionDetection.py pygameInput.py
Copy source to clipboard:
Online Diff Tool:
If you've typed in the source code, but are seeing errors, you can compare your code to the book's code with the online diff tool: Collision Detection, Pygame Input.