Yes, I can solve the problem by recursive function. I guess Function Call consume more resources than nested For. So I use the nested For by using exec function.
2008/8/18 Paul Boddie <[EMAIL PROTECTED]> > On 17 Aug, 19:36, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > > > and functions will solve the 40-billion year computation problem exactly > > how? > > I was thinking more about the need to nest "for" statements to a depth > of 20 levels, which I imagine only arises on a "just in case" basis > for the inquirer. In other words, the inquirer may have input that > could theoretically demand twenty levels of state, each level provided > by a single "for" statement, but in practice they might only need to > manage a few levels of state. > > In any case, we're potentially seeing the use of the wrong tool for > the job, and I am speculating that functions would be the right tool, > but unless the inquirer is willing to show the code (which I haven't > seen in this thread yet), it's hard to speculate further. > > Paul > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list