Just change your list:
b = [el[0] for el in a]
Or:
from operator import itemgetter b = map(itemgetter(0), a)
Or, if you are dealing with "right arrays":
import numpy as np a = [ [1,2], [2,9], [3,7] ] na = np.array(a) print na[:,0]
And zip :
print zip(*a)[0]
source share