Indexes Starting at 0

In Lua, indexes start at 1, but in Python, it starts at 0. The compiler follows Python's rule and all indexes start at 0 after compilation.

local myTable = {1,2,3}
print(myTable[1]) -- 1
myList = [1,2,3]
print(myList[1]) # 2

Last updated