There are four types of assignments. The simplest one is a variable
assignment:
variable = expression
There are also subscript assignment and slice assignment available;
they replace an element or a range of elements of a list or string
with new elements. For the subscript assignment, the assigned
expression must be of the type of an element (i. e. a scalar for lists
or a character/integer for strings). For slice assignments, the
assigned expression must be of the same type as the sliced expression
is. There are special forms for slice assignment that assign the
"empty slice" at the beginning or and of a list, thereby adding
elements to the beginning or end of it.
variable[subscript] = expression
variable[from..to] = expression
variable[<] = expression
variable[>] = expression
The last assignment is a list assignment, which can be used to
assign the elements of a list to multiple variables. If there is a
"rest" element given at the end, it will receive the rest of the
list.
[var1, var2, ..., varn .. rest] = expression