Mathematica > Core Language > Defining Variables and Functions > Assignments >

AppendTo

AppendTo[s, elem]
appends elem to the value of s, and resets s to the result.
  • You can use AppendTo repeatedly to build up a list, though Sow and Reap will usually be more efficient.  »
New in 1 | Last modified in 5
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team