Possible Duplicate:
First items in inner list efficiently as possible
Lets say I have:
a = [ [1,2], [2,9], [3,7] ]
I want to retrieve the first element of each of the inner lists:
b = [1,2,3]
Without having to do this (my current hack):
for inner in a:
b.append(inner[0])
I'm sure there's a one liner for it but I don't really know what i'm looking for.