how to sort 2d list in python by first column code example Example: python order 2d array by secode element sorted(arr, key=lambda x: x[1])