Question:
I have a list of lists. I am trying to find the indices of lists whose length is 4. Here is the code:Answer:
When you iterate overlist_of_lists
like so, j
is the inner list, so you need to check whether len(j) == 4
:If you have better answer, please add a comment about this, thank you!