On Sun, 19 Jun 2011 15:56:27 +0300, Ethan Furman <et...@stoneleaf.us> wrote:

Lie Ryan wrote:

def length(L):
    if not L: return 0
    return 1 + length(cdr(L))

How is this different from regular ol' 'len' ?

It's better, because len() can't overflow the stack. ;)

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to