Python program to Sort a list according to the second element of sublist
Sorting a list by the second element of each sublist means rearranging the sublists based on the value at index 1. For example, given the list [[1, 3], [2, 1], [4, 2], [3, 5]], sorting by the second element results in [[2, 1], [4, 2], [1, 3], [3, 5]], where the second elements (1, 2, 3, 5) are in as