It's Fun(ctional)

What will this Python 2 code print?

1
2
3
4
x = lambda x: x(x)
y = lambda y: (lambda z: y(y(z)))
z = lambda z: z+1
print (x)(y)(z)(0)


Try to solve this without running the code!
This problem is inspired by what I learned in CS.
×

Problem Loading...

Note Loading...

Set Loading...