Part• expr[[i]] or Part[expr, i] gives the part of expr. • expr[[-i]] counts from the end. • expr[[i, j, ... ]] or Part[expr, i, j, ... ] is equivalent to expr[[i]] [[j]] ... . • expr[[{ , , ... }]] gives a list of the parts , , ... of expr. • You can make an assignment like t[[i]] = value to modify part of an expression. • When expr is a list, expr[[{ , , ... }]] gives a list of parts. In general, the head of expr is applied to the list of parts. • You can get a nested list of parts from expr[[ , , ... ]]. Each part has one index from each list. • expr[[spec]] can be input as expr spec . • and can be entered as [[ and ]] or \[LeftDoubleBracket] and \[RightDoubleBracket]. • expr[[spec]] can be input as or . • See also: First, Last, Position, Take.
Examples Using InstantCalculatorsHere are the InstantCalculators for the Part function. Enter the parameters for your calculation and click Calculate to see the result.
Out[1]= |  |
Out[2]= |  |
Entering Commands DirectlyYou can paste a template for this command via the Text Input button on the Part Function Controller. This finds the third element from the list using the shorthand notation for Part.
Out[3]= |  |
This pulls out a list of elements.
Out[4]= |  |
The second input resets the third element of the list using the special characters for Part.
Out[5]= |  |
Out[6]= |  |
Out[7]= |  |
Clear the variable definition.
|