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. – MikeLimaOscar May 04 '17 at 08:30DeleteCases. – Kuba May 04 '17 at 08:34data /. {_, _, 0} -> Nothing– ktm May 04 '17 at 13:17