What is the output of `(lambda f: f(f))(lambda f: ‘called’)`?

Python Professional Hard

Python Professional — Hard

What is the output of `(lambda f: f(f))(lambda f: ‘called’)`?

Key points

  • The lambda function is invoked with itself as an argument
  • This leads to the inner lambda function returning 'called'
  • The output is not a TypeError, None, or RecursionError

Ready to go further?

Related questions