December 2018
— Anybody can send me telegram game
Pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')]pairs.sort(key=lambda pair: pair[1])I'm unable to figure out output of this
— What is this
— It sorts your list by second elements
— Because of the “pair[1]”?
— Yep
— Https://stackoverflow.com/questions/29781862/how-does-this-example-of-a-lambda-function-work
— I love google and stack overflow
— You should
— Got it ,thanks BTW how could I get my script to print 'three' I.e Pair[1] of Pairs[2] ?
— I don’t understand your question
— I mean an element of tuple(/pair) which is inside the list