On Wed, May 03, 2017 at 07:32:53PM -0400, Stephen P. Molnar wrote:
[...]
> When it is run I get:
>
> IndexError: list index out of range
That alone is useless to us. Please post the full traceback, starting
from the line
Traceback (most recent call last):
Among other things, it will show us the line of code that causes the
error. Otherwise, we're just guessing.
You might also like to consider a simple debugging technique: print
the index and the length of the list just before trying to use them.
E.g. if you want to extract the nth item of a list, write:
print(n, len(a_list))
value = a_list[n]
(And yes, I completely agree that the error message should show that
information, but it currently doesn't.)
--
Steve
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor