Suppose I have a normal table $a$, what does $a[[-1]]$ mean, which element of the table?
Asked
Active
Viewed 506 times
0
1 Answers
1
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.
Oliver Redman
- 311
- 2
- 7
Part. – corey979 Dec 22 '16 at 01:35