1
$\begingroup$

This question already has an answer here:

I have a big list, for simple, it just like:

list = {
        {1, Overflow[], 3}, 
        {Overflow[], Overflow[], 7}, 
        {Overflow[], 4, 2}, {7, 8, 9},
        {-1, Overflow[], 3}, {-1, 10, 10}
       };

I don't know where contain Overflow[], so I want to filter the list by Select[] function, If Overflow[] at the first position, I know it will work by:

Select[list, Not[#[[1]] == Overflow[]] &]

It will return {{1, Overflow[], 3}, {7, 8, 9}, {-1, Overflow[], 3}, {-1, 10, 10}}

Is there any way to check all the positions, return {{7, 8, 9}, {-1, 10, 10}}?

$\endgroup$

marked as duplicate by rhermans, MarcoB, m_goldberg, Alex Trounev, C. E. Aug 14 at 17:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2
$\begingroup$
Select[list, FreeQ[Overflow[]]]
(* {{7, 8, 9}, {-1, 10, 10}} *)

Select[list, Not@*MemberQ[Overflow[]]]
(* {{7, 8, 9}, {-1, 10, 10}} *)

Select[list, ContainsNone[{Overflow[]}]]
(* {{7, 8, 9}, {-1, 10, 10}} *)
$\endgroup$
  • $\begingroup$ Your answer is well done. $\endgroup$ – zongxian Aug 12 at 23:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.