You could sort your list of lists using a key that returns the length of the list with reverse set to true so the largest is first.
Below shows how to use sort with a key that I call getKey. If you do not include it, the list will not be sorted by length by default.
def getKey(item): return len(item)
a = [[1,2,4],[4,5,6,7,8],[1,2,3,4,5,6,7,8,9]]
a.sort(key = getKey, reverse = True)
print a
[[1, 2, 3, 4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8], [1, 2, 4]]
Here is what happens if you leave out key = getKey:
a = [[1,2,4],[4,5,6,7,8],[1,2,3,4,5,6,7,8,9]]
a.sort()
print a
[[1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 4], [4, 5, 6, 7, 8]]
With the selection of the 2 largest lists included, the code becomes:
def getKey(item): return len(item)
a = [[1,2,4],[4,5,6,7,8],[1,2,3,4,5,6,7,8,9]]
a.sort(key = getKey, reverse = True)
b = a[:2]
print b
[[1, 2, 3, 4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8]]
Regards,
Terry.