[Tutor] Program for outputing the letter backward

Kent Johnson kent37 at tds.net
Wed Mar 29 05:46:29 CEST 2006

Hoffmann wrote:
> --- Kent Johnson <kent37 at tds.net> wrote:
>>You are confusing the index of a letter - the number
>>which represents 
>>its position in the word - with the letter itself.
>>In your code, index 
>>and index_zero are actually letters, not indices.
>>Try to rewrite the 
>>code so they are numbers.
> Sorry for not showing the traceback the first time.
> Please, see it below:
> Traceback (most recent call last):
>   File "<stdin>", line 2, in ?
> TypeError: string indices must be integers
> Any hint?

Already gave the hint in the first part of my reply. The error message 
repeats it.


More information about the Tutor mailing list