ListQ

ListQ[expr]

gives True if the head of expr is List, and False otherwise.

Examples

open allclose all

Basic Examples  (2)

ListQ gives True when the head of an expression is List:

ListQ gives False when the head of an expression is not List:

ListQ gives False on other array representations:

Properties & Relations  (3)

ListQ is equivalent to MatchQ[#,_List]&:

VectorQ returns True for other 1D array representations:

ListQ[list] is not affected by deeper levels of List:

VectorQ[list] does not accept deeper levels of List:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_listq, organization={Wolfram Research}, title={ListQ}, year={1991}, url={https://reference.wolfram.com/language/ref/ListQ.html}, note=[Accessed: 21-November-2024 ]}