0
$\begingroup$

Suppose I have a normal table $a$, what does $a[[-1]]$ mean, which element of the table?

$\endgroup$
2
  • 1
    $\begingroup$ The last one; see the docs of Part. $\endgroup$
    – corey979
    Dec 22, 2016 at 1:35
  • 1
    $\begingroup$ Here is an answer of interest. $\endgroup$ Dec 22, 2016 at 1:38

1 Answer 1

1
$\begingroup$

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.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.