lst = [[1, 2, 3, 4], [10], [5, 6, 7, 8, [10, 20, 30, 40]]]
lst.sort(reverse=True)
print(lst)
The output of the above code is,
[[10], [5, 6, 7, 8, [10, 20, 30, 40]], [1, 2, 3, 4]]
I wrote this code to see how this list with sub lists is sorted, but seeing the result, I have no clue of how it is being sorted. Can anyone help me in this regard.
Thanks in advance!