On Wed, May 7, 2014 at 8:49 PM, Scott W Dunning <scott....@cox.net> wrote: > > On May 5, 2014, at 10:13 PM, meenu ravi <meenurav...@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? _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor