0
$\begingroup$

This question is a followup from appending elements to sublist

mergedList =     { 
        { {"a","b"}, -1.5, -5, "no" }, 
        { {"c","d"}, -2,-10, 7 }

}

I have processed my data, and I want to remove every sublist that contains "no". I tried

DeleteCases[mergedList, "no", 2]

But it does not work.

$\endgroup$
2
  • 2
    $\begingroup$ It works, but indeed, not the way you want. You have to specify what to delete with pattern: DeleteCases[mergedList, {__, "no"}] $\endgroup$
    – Kuba
    Apr 29 '14 at 20:14
  • 1
    $\begingroup$ I'd say it's a duplicate of mathematica.stackexchange.com/q/45429/5478 the only difference is that there is Cases. $\endgroup$
    – Kuba
    Apr 29 '14 at 20:22