Re: [Tutor] lists and recursion

2006-07-22 Thread Gabriel Farrell
On Sat, Jul 22, 2006 at 06:20:12AM -0400, Kent Johnson wrote: > We just had a discussion of recursion, you might want to look at it - > though the code is a bit more complex than this example. > http://mail.python.org/pipermail/tutor/2006-July/048081.html Glad to see I'm not the only one to get t

Re: [Tutor] lists and recursion

2006-07-22 Thread Kent Johnson
Christopher Spears wrote: > I am working out of How To Think Like A Computer > Scientist. Here is the code for a module called > node.py: > > def printList(node): > nodeList = [] > while node: > nodeList.append(node.cargo) > n

[Tutor] lists and recursion

2006-07-21 Thread Christopher Spears
I am working out of How To Think Like A Computer Scientist. Here is the code for a module called node.py: def printList(node): nodeList = [] while node: nodeList.append(node.cargo) node = node.next pri