How to | Perform Operations on Lists
Lists are central constructs in
Mathematica that are used to represent collections, arrays, sets, and sequences of all kinds. Well over a thousand built-in functions throughout
Mathematica operate directly on lists, making them a powerful vehicle for interoperability.
Set up a list of 5 random integers between 0 and 10 (stored as

):
| Out[45]= |  |
Use
Max to get the largest element of

:
| Out[46]= |  |
Set up a 4×3 matrix of random integers between 0 and 10:
| Out[47]= |  |
Use
Map to apply
Max to each element of

at the top level:
| Out[48]= |  |
You can add two lists of the same length element by element:
| Out[49]= |  |
Add the scalar

to each element of a list:
| Out[50]= |  |
Multiply each element in the list by the scalar

:
| Out[51]= |  |
Set up a list of 5 integers:
| Out[43]= |  |
Prepend the element

at the beginning of the list

:
| Out[44]= |  |
Append

at the end of

:
| Out[45]= |  |
Insert the element

at position 3 of the list

:
| Out[46]= |  |
Delete the element at position 3 in

:
| Out[47]= |  |
Replace the element at position 3 in

with a new element

:
| Out[48]= |  |
Interleave

between the entries of

:
| Out[49]= |  |