Length

Length[expr]

gives the number of elements in expr.

Details

Examples

open allclose all

Basic Examples  (2)

Find the length of a list:

In[1]:=
Click for copyable input
Out[1]=

Find the length of an Association:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (2)

Generalizations & Extensions  (5)

Applications  (5)

Properties & Relations  (1)

Possible Issues  (5)

See Also

LeafCount  ByteCount  Dimensions  Depth  StringLength  AtomQ  ComplexityFunction  LengthWhile  CountDistinct

Tutorials

Introduced in 1988
(1.0)
| Updated in 2014
(10.0)