6.40.11 Appending an element at the end of a list: append
The append command adds an element to the end of a list.
-
append takes two arguments:
- append(L,x) returns a list L with the additional
element x at the end.
Examples.
-
Input:
append([3,4,2],1)
Output:
- Input:
append([1,2],[3,4])
Output: