0
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ The last one; see the docs of Part. $\endgroup$ – corey979 Dec 22 '16 at 1:35
  • 1
    $\begingroup$ Here is an answer of interest. $\endgroup$ – J. M.'s discontentment Dec 22 '16 at 1:38
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.

| improve this answer | |
$\endgroup$

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