SHOCK: WHY None?

Dave Borne dborne at gmail.com
Fri Sep 21 16:13:51 CEST 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