LogiQuest
Back to Lambda and Functional Tools
6

What is the output of the following code?

pairs = [(1, 'b'), (2, 'a')]
print(sorted(pairs, key=lambda p: p[1])[0])
Medium

Discussion (0)

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

Log in to join the discussion.