Trip Technician <luke.d...@gmail.com> writes: > I have a dim intuition that it could be done with a very clever bit of > recursion, but the exact form so far eludes me.
This sounds a little like a homework assignment, or maybe a challenge you are trying to solve for yourself, rather than be given a complete answer for. Anyway, the basic idea is to enumerate the expression trees with 1 digit, then 2 digits, then 3 digits, etc, and compute the value expressed by each tree. -- http://mail.python.org/mailman/listinfo/python-list