Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > List Manipulation >
Mathematica > Data Handling & Data Sources > Handling Arrays of Data >
Constructing Lists
Mathematica provides powerful functions for constructing lists of any size and structure.
Range form a list from a range of numbers or other objects {1, 2, 3, ...}
Table make a table of any dimension of values of an expression
Array make an array of any dimension by applying a function to successive indices
ConstantArray form of a constant array of any dimension
SparseArray, Normal create a list from a sparse array positionvalue specification
    
Tuples all possible n-tuples from a list
Subsets  ▪ Permutations  ▪ Outer
RandomInteger, RandomChoice, ... make lists of random elements
    
Lists from Iteration
NestList create a list by successively iterating a function
Sow, Reap create lists of elements "sown" inside programs
    
IntegerDigits, RealDigits make lists from digits in numbers
CoefficientList, CoefficientArrays make lists from polynomials or equations
    
Characters make a list from the characters in a string
CharacterRange a list of a range of characters (e.g. "a" through "z")
    
ReplaceList make a list of possible pattern replacements
    
Importing Data as Lists
Import  ▪ ReadList  ▪ BinaryReadList  ▪ FindList  ▪ FileNames
TUTORIALS
MORE ABOUT
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team