WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

Append [expr,elem]

gives expr with elem appended.

Append [elem]

represents an operator form of Append that can be applied to an expression.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Generalizations & Extensions  
Applications  
Possible Issues  
See Also
Tech Notes
Related Guides
Related Links
History
Cite this Page

Append

Append [expr,elem]

gives expr with elem appended.

Append [elem]

represents an operator form of Append that can be applied to an expression.

Details

  • In iteratively building a list, it is usually more efficient to use Sow and Reap than to use Append [list,new] at each step.
  • Append works on SparseArray objects, returning ordinary lists if necessary.
  • Append can be used on Association objects. Single new elements are specified in the form key->value. New values replace older ones if their keys are the same.
  • Multiple elements to append to an association can be specified in the form {key1->value1,key2->value2, }.
  • Append [elem][expr] is equivalent to Append [expr,elem].

Examples

open all close all

Basic Examples  (3)

Append to an Association :

Append several rules to an Association :

Generalizations & Extensions  (1)

Use a head other than List :

Applications  (4)

Append a row to a matrix:

Append to each row in a matrix:

Append a vector to a matrix:

Successively append to a list:

Possible Issues  (2)

When working on a shared list in parallel, Append is not atomic (or thread-safe):

Use AppendTo in such circumstances:

See Also

Prepend   Insert   AppendTo   PadRight   Sow   Join

Function Repository: AppendSequence   AppendColumn   AppendAt

History

Introduced in 1988 (1.0) | Updated in 2003 (5.0) 2014 (10.0)

Wolfram Research (1988), Append, Wolfram Language function, https://reference.wolfram.com/language/ref/Append.html (updated 2014).

Text

Wolfram Research (1988), Append, Wolfram Language function, https://reference.wolfram.com/language/ref/Append.html (updated 2014).

CMS

Wolfram Language. 1988. "Append." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/Append.html.

APA

Wolfram Language. (1988). Append. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Append.html

BibTeX

@misc{reference.wolfram_2025_append, author="Wolfram Research", title="{Append}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/Append.html}", note=[Accessed: 04-January-2026]}

BibLaTeX

@online{reference.wolfram_2025_append, organization={Wolfram Research}, title={Append}, year={2014}, url={https://reference.wolfram.com/language/ref/Append.html}, note=[Accessed: 04-January-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /