Ask Your Question

Revision history [back]

ithout further information on your concrete use case, such an error appears when you asks for the letter of a string at an index that is larger than the length of the string:

sage: s = 'abc'
sage: s[0]
sage: s[1]
sage: s[2]
sage: s[3]
IndexError: string index out of range