Working with Lists

Lists can be entered in Mathics3 with curly braces { and }:

There are various functions for constructing lists:

The number of elements of a list can be determined with Length:

Elements can be extracted using double square braces:

Negative indices count from the end:

Lists can be nested:

There are alternate forms to display lists:

There are various ways of extracting elements from a list:

Lists can be used to assign values to multiple variables at once:

Operations like addition and multiplication, “thread” over lists; lists are combined element-wise:

It is an error to combine lists with unequal lengths:

The Structure of Mathics3 Objects