Implementing MapReduce with multiprocessing

While looking for example applications for Python’s multiprocessing module to use in this week’s PyMOTW, someone suggested implementing MapReduce. Below is the simple implementation I came up with (the source is included in the PyMOTW tarball as of version 1.89).

Read more at pymotw.com: multiprocessing/mapreduce.html