On 20 Feb, 16:02, Paul Rubin <http://phr...@nospam.invalid> wrote: > 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.
Thanks will get onto it. It's just a challenge I set myself so hints only are cool. -- http://mail.python.org/mailman/listinfo/python-list