2

I just wonder is there any other programming language to support negative index.

About C, the pointer can be calculated just like number. so please except it.

But in python, my_list[-1] is the last of list.

Is Python the only language supporting such a negative indexing concept?

your answer will be helpful, with various language experience. :)

Have a nice day :)

Michael
  • 21
  • 2

1 Answers1

2

According to this article,

  • Ch
  • LiveCode
  • Mathematica
  • Python
  • Ruby
  • S-Lang
  • Wolfram Language

Can use Negative indexing for accessing the array elements from the last.

Mohi
  • 1,776
  • 1
  • 26
  • 39