More suggestions for a real-world Python programmer: - There's code duplication, the original poster may express reet as a composition of the other functions. - A Python string/list/array can be inverted with [::-1] - I suggest to convert the examples of the main doscstring into doctests. - The main docstring looks too much heavy. - To convert many ASCII chars there's the str.translate method. - Generally I suggest to learn to code in the small, using as little code as possible.
Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list