Newbie: conventional instead of recursive way

Igor Zivkovic izivkov1 at jagor.srce.hr
Wed Dec 18 18:18:07 EST 2002


Steve Holden <sholden at holdenweb.com> wrote:

> You can look as long as you like. What makes you feel that recursion is
> "unconventional"? It's a perfectly valid technique for dealing with
> recursive data structures, and in fact the most natural way to handle them.
> Or is this purely an intellectual exercise? I just don't see what you hope
> to gain by avoiding recursion.

I know that the proper way to do it is with recursion. I shouldn't 
have called it unconventional though, sorry. Its just an exercise I can't 
solve. I've read in some tutorial it can be done using loops but it didn't 
give any examples and I can't figure it out on my own. I was hoping 
someone could at least give me a hint.

-- 
Igor



More information about the Python-list mailing list