http://learnpythonthehardway.org/book/ex38.html