I need to write a function to flat nested lists as this one:
To the result:
So I searched for example code and I found this one that uses recursion (that I don't understand):
ret = 
for i in l:
if isinstance(i, list) or isinstance(i, tuple):
ret.extend(flatten(i)) #How is flatten(i) evaluated?
So I know what recursion is, but I don't know how is
evaluated, what value does it returns?