I've got a list that looks like this:
some_list = [['a', 'b', 'c', 'd'], ['e', 'f', 'g', 'h'], ['', '', '', '']]
I want to remove all empty sublists within the list, so that the product is just
clean_list = [['a', 'b', 'c', 'd'], ['e', 'f', 'g', 'h']]
I've tried the following
for x in some_list:
if x == ['', '', '', '']:
some_list.remove(x)
and
clean_list = filter(None, list)
and
clean_list = [x for x in list if x]
but I keep getting an output with sublists with empty entries. Thoughts?