a = {{4, 5, 6}, {7, 8, 9}, {10, 11, 12}, {1, 2, 3}, {11, 12, 13}};
b = {11, 8, 13};
Select[a, DisjointQ[b, #] &]
Select[a, {} == b ⋂ # &]
{{4, 5, 6}, {1, 2, 3}}
{{4, 5, 6}, {1, 2, 3}}
DisjointQ
introduced in Mathematica 10. Use the second line in earlier versions.
Actually the second line appears to be faster in every test I have performed so I would use it regardless of version. For example:
SeedRandom[1]
a = RandomInteger[999, {5000, 100}];
b = {11, 8, 13};
Select[a, DisjointQ[b, #] &] // Length // RepeatedTiming
Select[a, {} == b ⋂ # &] // Length // RepeatedTiming
{0.11, 3686}
{0.0286, 3686}
In this particular case using Alternatives
falls somewhere in the middle:
Select[a, FreeQ[Alternatives @@ b]] // Length // RepeatedTiming
{0.0463, 3686}
Due to its early exit behavior in a case where most of the lists will be rejected it pulls ahead:
SeedRandom[1]
a = RandomInteger[99, {5000, 100}];
Select[a, {} == b ⋂ # &] // Length // RepeatedTiming
Select[a, FreeQ[Alternatives @@ b]] // Length // RepeatedTiming
{0.0291, 223}
{0.0247, 223}
c=DeleteCases[a, lis_ /; MemberQ[lis, Alternatives @@ b]]
... $\endgroup$