[Tutor] Final review

Danny Yoo dyoo at hashcollision.org
Thu May 8 06:34:49 CEST 2014


On Wed, May 7, 2014 at 8:49 PM, Scott W Dunning <scott.w.d at cox.net> wrote:
>
> On May 5, 2014, at 10:13 PM, meenu ravi <meenuravi89 at gmail.com> wrote:
>
>> Likewise, the index of d, which is the last word in the word "Hello world" is 10.
>>
>> So, the maximum index you can access in the word "Hello world" is 10. But when you try to give the command,
>>
>> >>> greeting [len(greeting)]
>>
>> It is trying to access the character at the position "11", where the string "Hello world" doesn't contain any value in the index "11" and the maximum index is 10. So it throws the following error.
>
> I think this is where I am getting confused.  I guess I don’t understand why/how it’s trying to access the character at the index 11?


Do you mean: why 11?

If so: how many characters long is the greeting?


More information about the Tutor mailing list