I would like to fetch i'th element from all the sub lists in a list of lists.I tried using map and lambda function as below
extract = lambda x,i :x[i]
a = [[1,2,3],[4,5,6],[6,7,8]]
b = list(map(extract(i = 1),a))
I expect b to be [2,5,7] but I know the last line doesn't work. How should I approach this with map and lambda