Array = [[1,2,3], [4,5,6], [7,8,9]]
Column index = 2
编写Python函数根据给定的列索引对二维数组进行排序
def sortByColIndex(arr, col_index): 
  
    arr.sort(key=lambda x : x[col_index]) 
    return arr 

sortedArray = sortByColIndex(arr, 2) 
print(sortedArray) 

输出:
[[3, 2, 1], [6, 5, 4], [9, 8, 7]]