get a list `res_list` of the first elements of each tuple in a list of tuples `rows`,res_list = [x[0] for x in rows]