I have some Python code that basically looks like this:
my_start_list = ...
def process ( my_list ):
#do some stuff
if len(my_list) > 1:
You call process recursively but never ignore it's return value when you do. Add a return statement to pass on the return value::
def process ( my_list ):
#do some stuff
if len(my_list) > 1:
return process(my_list)
else:
print(my_list)
return my_list
Now, when len(my_list) > 1 is True, you actually pass on the return value of the recursive call.