LogiQuest
Back to Lambda and Functional Tools
16

What is the output of the following code?

fs = [lambda: i for i in range(3)]
print([f() for f in fs])
Hard

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.