Question: 
Write a function to extract a specified column from a given nested list.


Model's Code:
def extract_column(nested_list, col_index):
    return [row[col_index] for row in nested_list if col_index < len(row)]



Sample Correct Code:
def extract_column(list1, n):
   result = [i.pop(n) for i in list1]
   return result 


Asserts:
assert extract_column([[1, 2, 3], [2, 4, 5], [1, 1, 1]],0)==[1, 2, 1]
assert extract_column([[1, 2, 3], [-2, 4, -5], [1, -1, 1]],2)==[3, -5, 1]
assert extract_column([[1, 3], [5, 7], [1, 3], [13, 15, 17], [5, 7], [9, 11]],0)==[1, 5, 1, 13, 5, 9]


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 551 of 974: 406/551 (73.68421052631578%): success