Suppose, I have a list-
data = {{1, 2, 3}, {3, 5, 0}, {8, 9, 3}, {2, 5, 0}};
I want to delete second and fourth sublists for which third element of the row is zero. I can do this using
DeleteCases[data,{_,_,0}];
How can the same operation be achieved efficiently if the list contains a large number of elements instead of just 3?
__
(BlankSequence[]
) is what you are after. $\endgroup$ – MikeLimaOscar May 4 '17 at 8:30DeleteCases
. $\endgroup$ – Kuba♦ May 4 '17 at 8:34data /. {_, _, 0} -> Nothing
$\endgroup$ – ktm May 4 '17 at 13:17