I\'m going through the tutorial intro for Python and I\'m stuck on understanding a piece of code. This is from section 4.7.5 of the tutorial.
pairs = [(1, \'
your lambda function takes an tuple as input and return the element with index 1 (so the second element since the first would have 0 for index).
so the sorting will only take into consideration the second element of each tuple (the English word). That's why your output is sorted alphabetically in the second element 'four'>'one'>'three'>'two'