Does anybody know how to extract a column from a multi-dimensional array in Python?
def get_col(arr, col): return map(lambda x : x[col], arr) a = [[1,2,3,4], [5,6,7,8], [9,10,11,12],[13,14,15,16]] print get_col(a, 3)
map function in Python is another way to go.