in python am having a list of list as shown below:
list1 = [['BF001', '26-OCT-2020', '6167', '1', '07:35'],\
['Summary', '26-OCT-2020', '', '', '', ''],\
['BF004', '26-OCT-2020', '327', '2', '08:25'],\
['Summary', '26-OCT-2020', '', '', '', '' ],\
['BF005', '26-OCT-2020', '26983', '3', '07:40'],\
['BF005', '26-OCT-2020', '26983', '3', '07:40'],\
['BF005', '26-OCT-2020', '26983', '3', '07:40']]
i need to remove the sublist whose first element is 'Summary'. i have tried the following code:
for i in range(len(list1)):
if list1[i][0]=='Summary':
list1.pop[i]
but i am getting index out of range error.