Dec-10-2017, 04:42 PM
(Dec-10-2017, 06:33 AM)wavic Wrote:lambda pair: pair[1]lambda is called an anonymous function. The argument is passed before the ":". The expression which returns some value is after the colons. In this case, this is pair[1] which points to the second element of an iterable. So the list will be sorted by the second element of the tuples.
The second element of the iterable is "(2, 'two')"? Unfortunately, I still don't understand this order 4-1-3-2.