I'm learning the lambda options to return in python and i have a question:
I need to fill the returns in this function:
def func(n):
if n==0:
print("finished")
else:
return ___
func(5)()()()()()
func(3)()()()
func(8)()()()()()()()()
The output:
finished
finished
finished
I thought this one is a recursive call like return func(n-1) but it doesn't work, and throws an error. Is there an option to overcome the extra empty brackets? count them? do something, because it should be runnable.
Thanks
def foo():..., then foo is the function itself, and you can call it as foo(). And you can return a function from a function