LogiQuest
Back to Lambda and Functional Tools
13

What is the output of the following code?

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

Discussion (0)

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

Log in to join the discussion.