Previous Up Next

5.3.4  Accessing elements

The elements of sequences and lists are indexed starting from 0 in Xcas syntax mode and from 1 in all other syntax modes (see Section 3.5.2). To access an element of a list or a sequence, follow the list with the index between square brackets.


Examples.

If you want the indices to start from 1 in Xcas syntax mode, you can enter the index between double brackets.


Example.
Input:

L[[1]]

Output:

2

Previous Up Next