What is the expected output of the following code?
What is the expected output of the following code?
A
in the invocation of foo() in the example there's clearly an L and not a 1... Assuming it's supposed to be a 1: A is correct, if it's an L: D is correct.
answer: A. 3
y(x) ????
I get exception for return y(X) statement
What kind of statement is y(x)? how does that work? can someone please explain?
y becomes 'lambda x: x*x' as stated in the print function. With x == 1 we will get lambda x: 1*1(1) + (1+1) = 3