Code :
two_di_list = [[0, 1], [2, 3, 4]] for sub_list in two_di_list: sub_list.sort(reverse=True) print(two_di_list)
Output :
[[1, 0], [4, 3, 2]]