li = [["Jake", 24], ["Harry", 20]]
li.sort(key=lambda x: x[1]) #Sorts based on 1st element of each sublist
In [6]: a = [['a', 'b', 'c'], ['d', 'e'], ['f', 'g', 'h'], ['i', 'j', 'k', 'l'], ['m', 'n'], ['o']]
In [7]: a.sort(key=len)
In [8]: print a
[['o'], ['d', 'e'], ['m', 'n'], ['a', 'b', 'c'], ['f', 'g', 'h'], ['i', 'j', 'k', 'l']]