| 1 | initial version |
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]
'a'
sage: s[1]
'b'
sage: s[2]
'c'
sage: s[3]
IndexError: string index out of range
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.