I was going through w3schools' writeup on Python lambdas and came across this example:
def myfunc(n): #Statement-1
return lambda a : a * n #Statement-2
mydoubler = myfunc(2) #Statement-3
print(mydoubler(11)) #Statement-4
It says that this code will print 22 as the output.
I am unable to wrap my head around statements-3 and 4 in this code... isn't mydoubler
in statement-3 a variable? How can it be used as a function in statement-4?