sort 2d array using 2nd element python code example Example: python order 2d array by secode element sorted(arr, key=lambda x: x[1])