I have a problem that, admittedly, I have already solved using Select
instead, but it is irking me that I cannot seem to construct the right pattern to solve it using Cases
. I would like the output of
Cases[
{{{1, 2}, {3}, {4, 5}}, {{6}, {}}, {{}, {}}},
(* THE CORRECT PATTERN HERE *)
]
to be
{{{1, 2}, {3}, {4, 5}}, {{6}, {}}}
In other words, I would like a pattern that picks up all the elements of the outer list that have at least one non-empty list as an element.
Thanks in advance for your help.