What is the expected output of the following code?

What is the expected output of the following code?

def foo(x,y,z):

return x(y) – x(z)

print {f00(lambda x: x % 2, 2, 1) )
A . 1
B . 0
C . -1
D . an exception is raised

Answer: C

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments