SHOCK: WHY None?

Dave Borne dborne at gmail.com
Fri Sep 21 10:13:51 EDT 2007


>     else:
>         f(i+1,sm+a[i])

Maybe because you are ignoring the return value of the when you recurse...

try this

     else:
         return f(i+1, sm+a[i])


-Dave



More information about the Python-list mailing list