Jul-04-2019, 06:42 PM
That error happens when a string index used is not a valid index of the string.
In the next example the last index of
In the next example the last index of
'string'
is 5, using 6 gives the error.>>> 'string'[6] Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: string index out of range