ContainsNone
ContainsNone[list1,list2]
yields True if list1 contains none of the elements in list2.
ContainsNone[list2]
is an operator form that yields True when the object to which it is applied contains none of the elements of list2.
Details and Options
- In ContainsNone[list1,list2], the listi must be lists of expressions, or representations of them, namely objects with heads like SparseArray, QuantityArray, Association or EntityClass.
- ContainsNone[list1,list2,SameTesttest] applies test to each pair of elements in the listi to determine whether they should be considered the same.
- ContainsNone[list2][list1] is equivalent to ContainsNone[list1,list2].
Examples
open allclose allBasic Examples (2)
Scope (5)
There are English words containing none of the five vowels:
Use ContainsNone in operator form:
Find the movies directed by Pedro Almodóvar whose cast includes none of several actors:
ContainsNone works with associations:
Options (2)
SameTest (2)
By default, ContainsNone considers elements to be the same if they are identical:
Changes of units are taken into account, as long as they represent the exact same quantity:
Numerical approximations are not considered as the same object:
Use Equal as the comparison function to have numerical tolerance:
Applications (2)
Properties & Relations (5)
ContainsNone[list1,list2] is equivalent to testing for empty intersection of the lists:
ContainsNone[list1,list2] is equivalent to DisjointQ[list1,list2]:
ContainsNone is a symmetric function of its arguments. That is, ContainsNone[list1,list2]==ContainsNone[list2,list1]:
Negation of ContainsNone[list1,list2] is equivalent to ContainsAny[list1,list2]:
ContainsNone[list,{}] always returns True:
Text
Wolfram Research (2015), ContainsNone, Wolfram Language function, https://reference.wolfram.com/language/ref/ContainsNone.html.
CMS
Wolfram Language. 2015. "ContainsNone." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ContainsNone.html.
APA
Wolfram Language. (2015). ContainsNone. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ContainsNone.html