Kirk Strauser: > Hint: recursion. Your general algorithm will be something like:
Another solution is to use a better (different) language, that has built-in pattern matching, or allows to create one. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list