KeyExistsQ

KeyExistsQ[assoc,key]

返回 True 如果指定的 key 存在于相关性 assoc 中,否则返回 False.

KeyExistsQ[key]

表示可以应用于表达式的 KeyExistsQ 的操作符格式.

更多信息

范例

基本范例  (2)

测试一个键是否存在于相关性中:

测试一个键是否存在于规则列表中:

Wolfram Research (2014),KeyExistsQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/KeyExistsQ.html.

文本

Wolfram Research (2014),KeyExistsQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/KeyExistsQ.html.

CMS

Wolfram 语言. 2014. "KeyExistsQ." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/KeyExistsQ.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_keyexistsq, organization={Wolfram Research}, title={KeyExistsQ}, year={2014}, url={https://reference.wolfram.com/language/ref/KeyExistsQ.html}, note=[Accessed: 17-November-2024 ]}