Michael
Michael

Reputation: 21

Except for python, is there any other language supporting negative index?

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 :)

Upvotes: 2

Views: 855

Answers (1)

Mohi
Mohi

Reputation: 1808

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.

Upvotes: 2

Related Questions