Use reversed(range) is recommended over range with negative step

https://mail.python.org/pipermail/python-ideas/2013-October/023733.html
Raise TypeError instead of AssertionError
Use new string formatting syntax

Python 2.5 support was dropped long ago to care about
Keep things simple