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$DeleteCases. $\endgroup$data /. {_, _, 0} -> Nothing$\endgroup$