The length is part of the array’s type; it must evaluate to a non-negative constant representable by a value of type int
. The length of array a
can be discovered using the built-in function len
. The elements can be addressed by integer indices 0 through len(a)-1
. Array types are always one-dimensional but may be composed to form multi-dimensional types.