DisjointQ

DisjointQ[list1,list2]

如果 list1list2 没有任何共同元素,生成 True,否则生成 False.

更多信息和选项

  • DisjointQ 适用于头部不是 List 的表达式.
  • 当应用于关联时,DisjointQ 比较它们的值.
  • DisjointQ[list1,list2,SameTesttest]listi 中的每一对元素应用 test 以确定其是否应被视为相同.

范例

基本范例  (1)

检验列表是否有共同元素:

Wolfram Research (2014),DisjointQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DisjointQ.html (更新于 2022 年).

文本

Wolfram Research (2014),DisjointQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DisjointQ.html (更新于 2022 年).

CMS

Wolfram 语言. 2014. "DisjointQ." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2022. https://reference.wolfram.com/language/ref/DisjointQ.html.

APA

Wolfram 语言. (2014). DisjointQ. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/DisjointQ.html 年

BibTeX

@misc{reference.wolfram_2024_disjointq, author="Wolfram Research", title="{DisjointQ}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/DisjointQ.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_disjointq, organization={Wolfram Research}, title={DisjointQ}, year={2022}, url={https://reference.wolfram.com/language/ref/DisjointQ.html}, note=[Accessed: 22-November-2024 ]}