Following the Perl Cookbook (by Tom Christiansen and Nathan Torkington, published by O'Reilly) spirit, the PLEAC Project aims to gather fans of programming, in order to implement the solutions in other programming languages.
In this document, you'll find an implementation of the Solutions of the Perl Cookbook in the Python language.
The latest version of Python is 2.4 but users of 2.3 and 2.2 (and in some cases earlier versions) can use the code herein. Users of 2.2 and 2.3 should install or copy code from utils.py (http://aima.cs.berkeley.edu/python/utils.py) [the first section provides compatability code with 2.4] Users of 2.2 should install optik (http://optik.sourceforge.com) [for optparse and textwrap] Where a 2.3 or 2.4 feature is unable to be replicated, an effort has been made to provide a backward-compatible version in addition to one using modern idioms. Examples which translate the original Perl closely but which are unPythonic are prefixed with a comment stating "DON'T DO THIS". In some cases, it may be useful to know the techniques in these, though it's a bad solution for the specific problem.