---
title: "List"
language: "en"
type: "Symbol"
summary: "{e1, e2, ...} is a list of elements."
keywords: 
- array
- collection
- dyad
- pair
- sequence
- set
- triple
- tuple
- vector
- matrix
- tensor
- finite set
- list
- list?
- listp
- vector
- vector?
- vectorp
- list
- listlist
- lists
canonical_url: "https://reference.wolfram.com/language/ref/List.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "List Manipulation"
    link: "https://reference.wolfram.com/language/guide/ListManipulation.en.md"
  - 
    title: "Computation with Structured Datasets"
    link: "https://reference.wolfram.com/language/guide/ComputationWithStructuredDatasets.en.md"
  - 
    title: "WDF (Wolfram Data Framework)"
    link: "https://reference.wolfram.com/language/guide/WDFWolframDataFramework.en.md"
  - 
    title: "Automated Reports"
    link: "https://reference.wolfram.com/language/guide/AutomatedReports.en.md"
  - 
    title: "Expressions"
    link: "https://reference.wolfram.com/language/guide/Expressions.en.md"
  - 
    title: "Language Overview"
    link: "https://reference.wolfram.com/language/guide/LanguageOverview.en.md"
  - 
    title: "Wolfram Language Syntax"
    link: "https://reference.wolfram.com/language/guide/Syntax.en.md"
  - 
    title: "Database Connectivity"
    link: "https://reference.wolfram.com/language/guide/DatabaseConnectivity.en.md"
related_functions: 
  - 
    title: "Association"
    link: "https://reference.wolfram.com/language/ref/Association.en.md"
  - 
    title: "Dataset"
    link: "https://reference.wolfram.com/language/ref/Dataset.en.md"
  - 
    title: "Sequence"
    link: "https://reference.wolfram.com/language/ref/Sequence.en.md"
  - 
    title: "ListPlot"
    link: "https://reference.wolfram.com/language/ref/ListPlot.en.md"
  - 
    title: "Listable"
    link: "https://reference.wolfram.com/language/ref/Listable.en.md"
  - 
    title: "CompoundElement"
    link: "https://reference.wolfram.com/language/ref/CompoundElement.en.md"
  - 
    title: "DelimitedSequence"
    link: "https://reference.wolfram.com/language/ref/DelimitedSequence.en.md"
  - 
    title: "Splice"
    link: "https://reference.wolfram.com/language/ref/Splice.en.md"
  - 
    title: "Nothing"
    link: "https://reference.wolfram.com/language/ref/Nothing.en.md"
  - 
    title: "Rule"
    link: "https://reference.wolfram.com/language/ref/Rule.en.md"
  - 
    title: "DataStructure"
    link: "https://reference.wolfram.com/language/ref/DataStructure.en.md"
related_tutorials: 
  - 
    title: "Making Lists of Objects"
    link: "https://reference.wolfram.com/language/tutorial/Lists.en.md#15346"
  - 
    title: "Operations on Scalars, Vectors, and Matrices"
    link: "https://reference.wolfram.com/language/tutorial/LinearAlgebra.en.md#20325"
---
# List ({...})

{e1, e2, …} is a list of elements.

## Details

* Lists are very general objects that represent collections of expressions.

* Functions with attribute ``Listable`` are automatically "threaded" over lists, so that they act separately on each list element. Most built‐in mathematical functions are ``Listable``.

* ``{a, b, c}`` represents a vector.

* ``{{a, b}, {c, d}}`` represents a matrix.

* Nested lists can be used to represent tensors.

* If ``Nothing`` appears in a list, it is automatically removed.

* ``Parallelize[{e1, e2, …}]`` evaluates the elements ``e1``, ``e2``, ``…`` in parallel. »

---

## Background & Context

``List`` is a very general construct used to represent collections of expressions. Lists may have any length or depth. The expression ``List[a, b, c, …]`` is commonly written and displayed using the shorthand syntax ``{a, b, c, …}``. Lists are particularly important in the Wolfram Language, which does not define explicit vector, matrix, tensor, etc. objects but rather uses (possibly nested) lists to represent such structures. For example, ``{a, b, c, …}`` can represent a vector, ``{{a, b}, {c, d}}`` a matrix, and so on.

Functions with attribute ``Listable`` are automatically “threaded” over lists, meaning they act separately on each list element. Most built‐in mathematical functions are ``Listable``.

``Apply`` replaces the head of a ``List`` (or any other expression) with a new head, while ``Map`` applies a function to elements on the first level of a ``List`` (or any other expression).

``SparseArray`` may be used to efficiently represent and compute with lists (or nested lists) that have a constant (often ``0``) “background” value. A ``SparseArray`` can be expanded to a full-dimensional ``List`` using ``Normal``.

Values of a list can be efficiently modified in place using ``Set``, e.g. ``list[[k]] = newValue``. Common operations to access, insert, or delete elements of a list include ``Part``, ``Take``, ``Drop``, ``Extract``, ``Insert``, ``Delete``, ``PadLeft`` / ``PadRight``, ``Append`` / ``AppendTo``, and ``Prepend`` / ``PrependTo``.

A flat list of values (i.e. a vector) may be plotted using ``ListPlot``, and an array of values given by a rectangular list of lists may be plotted using ``ArrayPlot``, ``MatrixPlot``, ``ListDensityPlot``, or related functions. Other important and useful functions commonly applied to lists include ``Total``, ``Accumulate``, ``Mean``, and ``ListConvolve``. 

``Association`` provides a generalization of symbolically indexed lists, associative arrays, dictionaries, hashmaps, structs, and a variety of other powerful data structures. An ``Association`` is so named because it associates keys with values, allowing highly efficient lookup and updating even with millions of elements.

A list can be converted to a sequence of expressions by applying ``Sequence`` to it. This can be particularly useful since functions in the Wolfram Language often take a flat sequence of arguments instead of an argument list, so use of ``Sequence`` allows list-represented data to be easily spliced into other functions.

---

## Examples (38)

### Basic Examples (1)

The short notation ``{…}`` and the ``FullForm`` notation ``List[…]`` are equivalent:

```wl
In[1]:= List[a, b, c, d]

Out[1]= {a, b, c, d}

In[2]:= FullForm[{a, b, c, d}]

Out[2]//FullForm= List[a, b, c, d]
```

### Scope (31)

#### Representation of Vectors, Matrices, and Other Arrays (4)

A vector is a list of nonlist elements:

```wl
In[1]:= v = {1, 2.3, x + 4};

In[2]:= VectorQ[v]

Out[2]= True
```

Many operations work on vectors, like ``Dot`` and ``Norm`` :

```wl
In[3]:= v.v

Out[3]= 6.29 + (4 + x)^2
```

---

A matrix is a list of vectors of equal length:

```wl
In[1]:= m = {{1, 2, 3}, {1, 4, 9}};

In[2]:= MatrixQ[m]

Out[2]= True
```

Many operations work with matrices, like ``Dot``, ``Transpose``, and ``Det`` :

```wl
In[3]:= m.Transpose[m]

Out[3]= {{14, 36}, {36, 98}}

In[4]:= Det[Transpose[m].m]

Out[4]= 0
```

---

A rectangular array is represented by nested lists with consistent dimensions:

```wl
In[1]:= ra = {{{1, 2, 3}, {4, 5, 6}}, {{7, 8, 9}, {10, 11, 12}}, {{13, 14, 15}, {16, 17, 18}}, {{19, 20, 21}, {22, 23, 24}}};

In[2]:= ArrayQ[ra]

Out[2]= True
```

Many operations work on arrays of any depth, like ``Dot`` and ``Fourier`` :

```wl
In[3]:= ra.{1, 2, 3}

Out[3]= {{14, 32}, {50, 68}, {86, 104}, {122, 140}}
```

The three-dimensional discrete Fourier transform:

```wl
In[4]:= Fourier[ra]

Out[4]= {{{61.2372 + 0. I, -2.44949 - 1.41421 I, -2.44949 + 1.41421 I}, {-7.34847 + 0. I, 0. + 0. I, 0. + 0. I}}, {{-14.6969 - 14.6969 I, 0. + 0. I, 0. + 0. I}, {0. + 0. I, 0. + 0. I, 0. + 0. I}}, {{-14.6969 + 0. I, 0. + 0. I, 0. + 0. I}, {0. + 0. I, 0. + 0. I, 0. + 0. I}}, {{-14.6969 + 14.6969 I, 0. + 0. I, 0. + 0. I}, {0. + 0. I, 0. + 0. I, 0. + 0. I}}}
```

---

Ragged arrays that are not rectangular can also be used:

```wl
In[1]:= ragged = {{1, 2, 3}, {4, 5}, {6}};
```

Many structural functions will work with ragged arrays:

```wl
In[2]:= ragged[[All, 1]]

Out[2]= {1, 4, 6}

In[3]:= Map[Total, ragged]

Out[3]= {6, 9, 6}
```

If the elements are at the same depth, you can use ``PadRight`` to make a rectangular array:

```wl
In[4]:= PadRight[ragged]

Out[4]= {{1, 2, 3}, {4, 5, 0}, {6, 0, 0}}
```

#### Constructing Lists (5)

``Range`` constructs a list consisting of a range of values:

```wl
In[1]:= Range[4]

Out[1]= {1, 2, 3, 4}

In[2]:= Range[4, -4, -2]

Out[2]= {4, 2, 0, -2, -4}

In[3]:= Range[0., 1., .1]

Out[3]= {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.}
```

---

``Array`` constructs lists using a function:

```wl
In[1]:= Array[f, 4]

Out[1]= {f[1], f[2], f[3], f[4]}

In[2]:= Array[2 ^ #&, 4]

Out[2]= {2, 4, 8, 16}
```

When given multiple dimensions, matrices or deeper arrays are constructed:

```wl
In[3]:=
h[i_, j_] := 1 / (i + j - 1);
Array[h, {4, 3}]

Out[3]= {{1, (1/2), (1/3)}, {(1/2), (1/3), (1/4)}, {(1/3), (1/4), (1/5)}, {(1/4), (1/5), (1/6)}}
```

---

``Table`` constructs lists using an expression and an iterator:

```wl
In[1]:= Table[f[i], {i, 4}]

Out[1]= {f[1], f[2], f[3], f[4]}

In[2]:= Table[2 ^ i, {i, -4, 4}]

Out[2]= {(1/16), (1/8), (1/4), (1/2), 1, 2, 4, 8, 16}
```

When given multiple iterators, matrices and arrays can be constructed:

```wl
In[3]:= h[i_, j_] := 1 / (i + j - 1);

In[4]:= Table[h[i, j], {i, 4}, {j, 3}]

Out[4]= {{1, (1/2), (1/3)}, {(1/2), (1/3), (1/4)}, {(1/3), (1/4), (1/5)}, {(1/4), (1/5), (1/6)}}

In[5]:= Table[h[i, j], {i, 4}, {j, i}]

Out[5]= {{1}, {(1/2), (1/3)}, {(1/3), (1/4), (1/5)}, {(1/4), (1/5), (1/6), (1/7)}}
```

---

Functional commands like ``NestList`` create lists of the results:

```wl
In[1]:= NestList[3#(1 - #)&, .1, 20]

Out[1]= {0.1, 0.27, 0.5913, 0.724993, 0.598135, 0.721109, 0.603333, 0.717967, 0.607471, 0.71535, 0.610873, 0.713121, 0.613738, 0.711191, 0.616195, 0.709496, 0.618334, 0.707991, 0.620219, 0.706642, 0.621897}

In[2]:= ListPlot[%, Filling -> Axis]

Out[2]= [image]
```

---

To construct a list when the length is not known ahead of time, ``Sow`` and ``Reap`` are efficient:

```wl
In[1]:=
rolls := Module[{prev = 0, next, r6 = Range[6]}, Reap[
	While[(next = RandomChoice[r6]) ≠ prev, 
	Sow[next];prev = next]][[2, 1]]]
```

Some trials of rolling a die until the same number comes up twice in a row:

```wl
In[2]:= rolls

Out[2]= {5, 3, 2}

In[3]:= rolls

Out[3]= {5, 1}

In[4]:= rolls

Out[4]= {5, 1, 2, 4, 5, 1, 2}
```

#### Listable Functions (4)

Add two vectors:

```wl
In[1]:= {1, 2, 3} + {a, b, c}

Out[1]= {1 + a, 2 + b, 3 + c}
```

Scalar multiple:

```wl
In[2]:= 2 * {1, 2, 3}

Out[2]= {2, 4, 6}
```

Sine of a vector:

```wl
In[3]:= Sin[2 Pi Range[0., 1., 1 / 13]]

Out[3]= {0., 0.464723, 0.822984, 0.992709, 0.935016, 0.663123, 0.239316, -0.239316, -0.663123, -0.935016, -0.992709, -0.822984, -0.464723, -2.4492935982947064`*^-16}
```

---

Scalar multiple of a matrix:

```wl
In[1]:= a * {{1, 2}, {3, 4}}

Out[1]= {{a, 2 a}, {3 a, 4 a}}
```

Matrix plus a vector adds the component of the vector to the rows of the matrix:

```wl
In[2]:= {{1, 2}, {3, 4}} + {a, b}

Out[2]= {{1 + a, 2 + a}, {3 + b, 4 + b}}
```

Function applied element-wise to a matrix:

```wl
In[3]:= Exp[{{1., 2., 3.}, {4., 5., 6.}}]

Out[3]= {{2.71828, 7.38906, 20.0855}, {54.5982, 148.413, 403.429}}
```

---

Any function that has the ``Listable`` attribute will thread over lists element-wise:

```wl
In[1]:= SetAttributes[f, Listable]

In[2]:= f[{1, 2, 3, 4}]

Out[2]= {f[1], f[2], f[3], f[4]}
```

---

Use ``Threaded`` to alter how listable functions combine arguments:

```wl
In[1]:= {{1, 2}, {3, 4}} + {a, b}

Out[1]= {{1 + a, 2 + a}, {3 + b, 4 + b}}

In[2]:= {{1, 2}, {3, 4}} + Threaded[{a, b}]

Out[2]= {{1 + a, 2 + b}, {3 + a, 4 + b}}
```

#### Operations on List Elements (5)

``Apply`` makes the elements of a list the arguments of a function:

```wl
In[1]:= Apply[f, {1, 2, 3}]

Out[1]= f[1, 2, 3]
```

If you have a nested list, applying at level 1 gives a list ``f`` applied to the sublists:

```wl
In[2]:= Apply[f, {{1, 2}, {3, 4}, {5, 6}}, {1}]

Out[2]= {f[1, 2], f[3, 4], f[5, 6]}
```

---

``Map`` applies a function to the elements of a list:

```wl
In[1]:= Map[f, {1, 2, 3, 4}]

Out[1]= {f[1], f[2], f[3], f[4]}
```

For a nested list, ``Map`` can apply ``f`` at any level or multiple levels:

```wl
In[2]:= Map[f, {{1, 2}, {3, 4}, {5, 6}}, {2}]

Out[2]= {{f[1], f[2]}, {f[3], f[4]}, {f[5], f[6]}}

In[3]:= Map[f, {{1, 2}, {3, 4}, {5, 6}}, 2]

Out[3]= {f[{f[1], f[2]}], f[{f[3], f[4]}], f[{f[5], f[6]}]}
```

---

``Do``, ``Product``, ``Sum``, and ``Table`` can iterate over a list:

```wl
In[1]:= list = {1, 2, 4, 8};

In[2]:= Do[Print[{i, Log[2, i]}], {i, list}]

During evaluation of In[2]:= {1, 0}

During evaluation of In[2]:= {2, 1}

During evaluation of In[2]:= {4, 2}

During evaluation of In[2]:= {8, 3}

In[3]:= Table[Log[2, i], {i, list}]

Out[3]= {0, 1, 2, 3}

In[4]:= Sum[k, {k, list}]

Out[4]= 15
```

---

``Part`` can be used to get elements of lists:

```wl
In[1]:= list = {1, 2, 4, 8};

In[2]:= list[[3]]

Out[2]= 4
```

You can get multiple parts by specifying a list of parts:

```wl
In[3]:= list[[{1, -1}]]

Out[3]= {1, 8}
```

Or by using ``Span`` :

```wl
In[4]:= list[[1 ;; -1 ;; 2]]

Out[4]= {1, 4}
```

---

Use ``Outer`` to apply a function to elements of multiple lists:

```wl
In[1]:= Outer[f, {1, 2}, {a, b, c}]

Out[1]= {{f[1, a], f[1, b], f[1, c]}, {f[2, a], f[2, b], f[2, c]}}
```

#### Combining Lists (4)

Use ``Join`` to combine two lists end to end:

```wl
In[1]:= Join[{a, b, c}, {1, 2, 3}]

Out[1]= {a, b, c, 1, 2, 3}
```

---

Use ``Splice`` to insert elements of one list as individual elements of another list:

```wl
In[1]:= {a, b, Splice[{x, y}], d}

Out[1]= {a, b, x, y, d}
```

A combination of ``Sequence`` and ``Apply`` can be used for the same effect:

```wl
In[2]:= {a, b, Sequence@@{x, y}, d}

Out[2]= {a, b, x, y, d}
```

Unlike ``Sequence``, ``Splice[list]`` is inert inside other functions:

```wl
In[3]:= f[a, b, Splice[{x, y}], d]

Out[3]= f[a, b, Splice[{x, y}], d]
```

---

Use ``Insert`` to place a whole list as a single element inside another list:

```wl
In[1]:= Insert[{1, 2, 3}, {a, b, c}, 2]

Out[1]= {1, {a, b, c}, 2, 3}
```

``Append`` behaves similarly:

```wl
In[2]:= Append[{1, 2, 3}, {a, b, c}]

Out[2]= {1, 2, 3, {a, b, c}}
```

As does ``Prepend`` :

```wl
In[3]:= Prepend[{1, 2, 3}, {a, b, c}]

Out[3]= {{a, b, c}, 1, 2, 3}
```

---

Use ``Flatten`` to remove inner lists:

```wl
In[1]:= Flatten[{{1, 2}, {a, b, c}}]

Out[1]= {1, 2, a, b, c}
```

#### Lists as Finite Sets (2)

``Complement``, ``Union``, and ``Intersection`` treat ``List`` as a set:

```wl
In[1]:=
s1 = {a, b, c};
s2 = {c, d, e};

In[2]:= Complement[s1, s2]

Out[2]= {a, b}

In[3]:= Union[s1, s2]

Out[3]= {a, b, c, d, e}

In[4]:= Intersection[s1, s2]

Out[4]= {c}
```

---

Construct various combinatorial structures using ``Subsets``, ``Tuples``, and ``IntegerPartitions`` :

```wl
In[1]:= Subsets[{1, 2, 3}]

Out[1]= {{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}

In[2]:= Tuples[{{0, 1}, {a, b}}]

Out[2]= {{0, a}, {0, b}, {1, a}, {1, b}}

In[3]:= IntegerPartitions[5]

Out[3]= {{5}, {4, 1}, {3, 2}, {3, 1, 1}, {2, 2, 1}, {2, 1, 1, 1}, {1, 1, 1, 1, 1}}
```

#### Lists as Control Structures (2)

Many commands use ``{var, vmin, vmax}`` as a specification of variable range:

```wl
In[1]:= Integrate[Sin[x], {x, 0, Pi / 2}]

Out[1]= 1

In[2]:= NDSolve[{x'[t] == x[t], x[0] == 1}, x, {t, 0, 1}]

Out[2]=
{{x -> InterpolatingFunction[{{0., 1.}}, {5, 7, 1, {25}, {4}, 0, 0, 0, 0, Automatic, {}, {}, False}, 
 {{0., 0.00009181159895230439, 0.00018362319790460877, 0.004699904090006258, 0.009216184982107908, 
   0.013732465874209558, 0.02762954517379235,  ... , 
   0.7053273576038781, 0.8053273576038781, 0.9026636788019391, 1.}}, 
 {Developer`PackedArrayForm, {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 
   36, 38, 40, 42, 44, 46, 48, 50}, CompressedData["«493»"]}, {Automatic}]}}

In[3]:= Table[var ^ 2, {var, -1, 3}]

Out[3]= {1, 0, 1, 4, 9}
```

---

Many commands use ``{v1, v2, …}`` for a collection of variables:

```wl
In[1]:= Solve[{x + y + z == 0, x + y == 1, y + z == 2}, {x, y, z}]

Out[1]= {{x -> -2, y -> 3, z -> -1}}

In[2]:= DSolve[{x'[t] == y[t], y'[t] == -x[t]}, {x, y}, t]

Out[2]= {{x -> Function[{t}, C[1] Cos[t] + C[2] Sin[t]], y -> Function[{t}, C[2] Cos[t] - C[1] Sin[t]]}}
```

#### Lists of Rules (2)

A list of rules is returned as a solution by many solving commands:

```wl
In[1]:= r = FindRoot[{Cos[x ^ 2 + y], (x - 2 y)}, {{x, 1}, {y, 2}}]

Out[1]= {x -> -1.528, y -> -0.764002}
```

You can use the values of the results with ``ReplaceAll`` :

```wl
In[2]:= {x, y}  /. r

Out[2]= {-1.528, -0.764002}

In[3]:= {Cos[x ^ 2 + y], (x - 2 y)} /. r

Out[3]= {-5.267838178243384`*^-15, 0.}
```

---

When multiple solutions are possible, the result is a list of rule lists:

```wl
In[1]:= s2 = Solve[{x ^ 2 + y ^ 2 == 1, x + y == 0}, {x, y}]

Out[1]= {{x -> -(1/Sqrt[2]), y -> (1/Sqrt[2])}, {x -> (1/Sqrt[2]), y -> -(1/Sqrt[2])}}
```

When a list of rule lists is used in ``ReplaceAll``, you get a list of results:

```wl
In[2]:= {x, y} /. s2

Out[2]= {{-(1/Sqrt[2]), (1/Sqrt[2])}, {(1/Sqrt[2]), -(1/Sqrt[2])}}

In[3]:= x ^ 2 + y ^ 2 == 1 && x + y == 0  /. s2

Out[3]= {True, True}
```

Even if there is only one solution, the extra ``List`` is used for consistent structure:

```wl
In[4]:= Solve[{x - y == 1, x + y == 0}, {x, y}]

Out[4]= {{x -> (1/2), y -> -(1/2)}}
```

#### Lists of Data (3)

Lists are very good for holding data since the elements can be anything:

```wl
In[1]:= data = {{"George", "Washington", 1789, False}, {"John", "Adams", 1797, True}, {"Thomas", "Jefferson", 1801, True}};
```

---

Sine of successive squares:

```wl
In[1]:= ssq = N[Sin[Range[10] ^ 2]]

Out[1]= {0.841471, -0.756802, 0.412118, -0.287903, -0.132352, -0.991779, -0.953753, 0.920026, -0.629888, -0.506366}
```

Plot the data:

```wl
In[2]:= ListPlot[ssq]

Out[2]= [image]
```

---

Data from a function sampled at points in two dimensions:

```wl
In[1]:=
f[x_, y_] := Sin[2 Pi x y];
Short[data = Flatten[Table[{{x, y}, f[x, y]}, {x, 0., 1., .1}, {y, 0., 1., .1}], 1]]

Out[1]//Short= {{{0., 0.}, 0.}, «119», {{1., 1.}, -2.4492935982947064`*^-16}}
```

A piecewise polynomial that interpolates the data:

```wl
In[2]:= ifun = Interpolation[data]

Out[2]=
InterpolatingFunction[{{0., 1.}, {0., 1.}}, {5, 7, 0, {11, 11}, {4, 4}, 0, 0, 0, 0, Automatic, {}, 
  {}, False}, {{0., 0.1, 0.2, 0.30000000000000004, 0.4, 0.5, 0.6000000000000001, 
   0.7000000000000001, 0.8, 0.9, 1.}, {0., 0.1, 0.2, 0.30000000000 ... 0, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 
   92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 
   113, 114, 115, 116, 117, 118, 119, 120, 121}, CompressedData["«588»"]}, {Automatic, Automatic}]
```

Plot the ``InterpolatingFunction`` :

```wl
In[3]:= Plot3D[ifun[x, y], {x, 0, 1}, {y, 0, 1}]

Out[3]= [image]
```

Plot the data directly:

```wl
In[4]:= ListPlot3D[Map[Flatten, data]]

Out[4]= [image]
```

### Properties & Relations (6)

Like all Wolfram Language expressions, lists are 1-indexed:

```wl
In[1]:= list = {a, b, c, d, e};

In[2]:= Delete[list, 1]

Out[2]= {b, c, d, e}

In[3]:= list[[3]]

Out[3]= c
```

---

In most format types, including ``InputForm``, lists are displayed as ``{…}`` :

```wl
In[1]:= InputForm[{a, b, c}]
```

Out[1]//InputForm= {a, b, c}

``FullForm`` treats lists like any other expression, displaying them as ``List[…]`` :

```wl
In[2]:= FullForm[{a, b, c}]

Out[2]//FullForm= List[a, b, c]
```

This makes it clear that lists have head ``List`` :

```wl
In[3]:= Head[{a, b, c}]

Out[3]= List
```

---

``Sequence`` is automatically spliced into lists:

```wl
In[1]:= {a, b, Sequence[x, y], d}

Out[1]= {a, b, x, y, d}
```

This is a particular case of the general behavior of ``Sequence`` :

```wl
In[2]:= f[a, b, Sequence[x, y], d]

Out[2]= f[a, b, x, y, d]
```

---

``Nothing`` is automatically removed from lists:

```wl
In[1]:= {a, b, Nothing, d}

Out[1]= {a, b, d}
```

This behavior is specific to lists:

```wl
In[2]:= f[a, b, Nothing, d]

Out[2]= f[a, b, Nothing, d]
```

---

A ``SparseArray`` represents a list:

```wl
In[1]:= list = {1, 0, 1, 0, 0, 1, 0, 0, 0, 1};

In[2]:= slist = SparseArray[list]

Out[2]= SparseArray[Automatic, {10}, 0, {1, {{0, 4}, {{1}, {3}, {6}, {10}}}, {1, 1, 1, 1}}]
```

They are ``Equal`` :

```wl
In[3]:= slist == list

Out[3]= True
```

They can be equivalently used in many commands:

```wl
In[4]:= slist + 3 == list + 3

Out[4]= True

In[5]:= Sin[N[slist]] == Sin[N[list]]

Out[5]= True
```

They are not identical because the representation is different:

```wl
In[6]:= slist === list

Out[6]= False
```

``Normal[slist]`` gives the ``List`` representation:

```wl
In[7]:= Normal[slist]

Out[7]= {1, 0, 1, 0, 0, 1, 0, 0, 0, 1}

In[8]:= % === list

Out[8]= True
```

---

``Parallelize[list]`` evaluates the elements of ``list`` in parallel:

```wl
In[1]:= Parallelize[{EchoEvaluation[0 + 1], EchoEvaluation[Pause[.1];Sqrt[4]], EchoEvaluation[6 / 2]}]

(kernel 1) "<< "0 + 1

(kernel 2) "<< "Pause[0.1]; Sqrt[4]

(kernel 3) "<< "6/2

(kernel 1) ">> "1

(kernel 3) ">> "3

(kernel 2) ">> "2

Out[1]= {1, 2, 3}
```

## See Also

* [`Association`](https://reference.wolfram.com/language/ref/Association.en.md)
* [`Dataset`](https://reference.wolfram.com/language/ref/Dataset.en.md)
* [`Sequence`](https://reference.wolfram.com/language/ref/Sequence.en.md)
* [`ListPlot`](https://reference.wolfram.com/language/ref/ListPlot.en.md)
* [`Listable`](https://reference.wolfram.com/language/ref/Listable.en.md)
* [`CompoundElement`](https://reference.wolfram.com/language/ref/CompoundElement.en.md)
* [`DelimitedSequence`](https://reference.wolfram.com/language/ref/DelimitedSequence.en.md)
* [`Splice`](https://reference.wolfram.com/language/ref/Splice.en.md)
* [`Nothing`](https://reference.wolfram.com/language/ref/Nothing.en.md)
* [`Rule`](https://reference.wolfram.com/language/ref/Rule.en.md)
* [`DataStructure`](https://reference.wolfram.com/language/ref/DataStructure.en.md)

## Tech Notes

* [Making Lists of Objects](https://reference.wolfram.com/language/tutorial/Lists.en.md#15346)
* [Operations on Scalars, Vectors, and Matrices](https://reference.wolfram.com/language/tutorial/LinearAlgebra.en.md#20325)

## Related Guides

* [List Manipulation](https://reference.wolfram.com/language/guide/ListManipulation.en.md)
* [Computation with Structured Datasets](https://reference.wolfram.com/language/guide/ComputationWithStructuredDatasets.en.md)
* [WDF (Wolfram Data Framework)](https://reference.wolfram.com/language/guide/WDFWolframDataFramework.en.md)
* [Automated Reports](https://reference.wolfram.com/language/guide/AutomatedReports.en.md)
* [`Expressions`](https://reference.wolfram.com/language/guide/Expressions.en.md)
* [Language Overview](https://reference.wolfram.com/language/guide/LanguageOverview.en.md)
* [Wolfram Language Syntax](https://reference.wolfram.com/language/guide/Syntax.en.md)
* [Database Connectivity](https://reference.wolfram.com/language/guide/DatabaseConnectivity.en.md)

## Related Links

* [Fast Introduction for Programmers: Lists](http://www.wolfram.com/language/fast-introduction-for-programmers/lists/)
* [An Elementary Introduction to the Wolfram Language: First Look at Lists](https://www.wolfram.com/language/elementary-introduction/03-first-look-at-lists.html)

## History

* Introduced in 1988 (1.0) \| [Updated in 2014 (10.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn100.en.md)