DisjointQ

DisjointQ[list1,list2]

yields True if list1 and list2 do not share any common elements, and False otherwise.

Details

  • DisjointQ works for expressions with heads other than List.
  • When applied to associations, DisjointQ compares their values.

Examples

Basic Examples  (1)

Test whether lists share no elements:

Wolfram Research (2014), DisjointQ, Wolfram Language function, https://reference.wolfram.com/language/ref/DisjointQ.html.

Text

Wolfram Research (2014), DisjointQ, Wolfram Language function, https://reference.wolfram.com/language/ref/DisjointQ.html.

BibTeX

@misc{reference.wolfram_2021_disjointq, author="Wolfram Research", title="{DisjointQ}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/DisjointQ.html}", note=[Accessed: 01-August-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_disjointq, organization={Wolfram Research}, title={DisjointQ}, year={2014}, url={https://reference.wolfram.com/language/ref/DisjointQ.html}, note=[Accessed: 01-August-2021 ]}

CMS

Wolfram Language. 2014. "DisjointQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DisjointQ.html.

APA

Wolfram Language. (2014). DisjointQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DisjointQ.html