I have a list:
l = [['a', []], ['b', []], ['c', []], ['d', ['e']], ['f', []], ['g', ['h']], ['i', ['j']]]
I want to count how many lists have the element [] next to the first element. for example, in this list we have 4 lists that have a blank list next to its first element.
Another example could be:
l2 = [['a', []], ['b', []], ['c', []], ['d', ['e', 'f']], ['g', ['h', 'i']], ['j', ['k', 'l']], ['m', ['n', 'o']]]
Here we have 3 lists that have elements that are [] next to the first element of a list.
I tried doing something like, but it returns 0
`````````````
def counting(l):c = sum(x.count("[]")for x in L)return c