Recursive function not returning value

Paul Rubin http
Fri Sep 17 09:19:50 CEST 2004


"Derek Rhodes" <rhoder at worldpath.net> writes:
>     if type(word) == str:
>         print "it's a word"
>         test([word])

The last line tests [word] and throws away the value.  YOu have to say
"return test([word])".



More information about the Python-list mailing list