recursion and linked lists

John Salerno johnjsal at NOSPAMgmail.com
Sat Apr 1 00:35:40 EST 2006


I V wrote:


> Note that print gets called after _each_ time that printBackward
> returns. So, as the different calls to printBackward return, they print
> whatever 'head' was set to in that invocation. Now, logically enough,
> the last call to printBackward is the first to return, so the last
> value of 'head' is printed first, and so in in the reverse order of the
> list.

Oh, that helps! Now I'm starting to understand when exactly it returns 
each time.



More information about the Python-list mailing list