Online Python Compiler

def fetch_greater_freq(row): return len([row[idx] for idx in range(0, len(row) - 1) if row[idx] < row[idx + 1]]) my_list = [[11, 3, 25, 99, 10], [5, 3, 25, 4], [77, 11, 5, 3, 77, 77], [11, 3, 25]] print("The list is :") print(my_list) my_list.sort(key=fetch_greater_freq) print("The resultant list is :") print(my_list)