Suppose I have a normal table $a$, what does $a[[-1]]$ mean, which element of the table?
1 Answer
a[[-1]] means the last element of table a. actually, the negative index means the order from the back,such as{a,b,c,d}[[-2]]
is c
, it helps to manipulate list more efficiently.
Part
. $\endgroup$