My efforts at solving http://www.pythonchallenge.com