Many users gave good answers, just beware negative numbers, since different languages may behave differently.
By example this C snippet writes "-1"
int main ()
{
printf("%d\n", (-4) % 3);
}
While in python we have a different output value
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> (-4) % 3
2
EDIT: Actually I don't think you'll have negative indexes! However it's good to know that.