You are viewing a single comment's thread. Return to all comments →
def athelete_sort(arr, k): arr.sort(key=lambda x: x[k]) for e_lst in arr: print(*e_lst) if __name__ == '__main__': nm = input().split() n = int(nm[0]) m = int(nm[1]) arr = [] for _ in range(n): arr.append(list(map(int, input().rstrip().split()))) k = int(input()) athelete_sort(arr, k)
Seems like cookies are disabled on this browser, please enable them to open this website
Athlete Sort
You are viewing a single comment's thread. Return to all comments →