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