To sort a list of tuples, use the sort() method and pass in the key parameter to indicate which item to sort by.
sort()
key