Mike Sweany wrote:
33 print len(playerid)
34 print playerid[0]
35
*playerid* = []
*<type 'exceptions.IndexError'>*: list index out of range
args = ('list index out of range',)
message = 'list index out of range'
If I change the print playerid[0] to print playerid[1], same error, but
if I change it to print playerid[2] or higher, it will show the same
error, but the playerid= [] will show the actual list values in the debug.
As far as I can see, playerid[0] can only fail with IndexError if
playerid is an empty list. Have you made sure that playerid will always
have something in it?
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor