append
Inserts an element at the back of a list.
Description
The append
function returns the list xs
with x
inserted at the end. The
expression xs.append(x)
is equivalent to [...xs, x]
.
Examples
Append a number to a list
See Also
concatenate
, prepend