I have Python code that looks something like this:
my_start_list = ... def process ( my_list ): #do some stuff if len(my_list) > 1: process(my_list) else: print(my_list) return my_list print(process(my_start_list))
The strange thing is: print (my_list) displays the correct content. However, the second print statement that prints the return value of the function always prints "No." Even if I replace the normal return statement with return ("abc") , it is still None.
Since the contents of the variable seem to be valid on the same line before the return statement, I donβt know where to start debugging. Are there any common problems that can cause this?
source share