examples from http://learnpythonthehardway.org/