Hi all,
I have wriiten the following code:
[Segment]
def survivor(names, step):
index = step - 1
next = names
while len(next)> 1:
next.remove (next[index])
However when ever i run it i get this error message:
Traceback (most recent call last):
File "<pyshell#46>", line 1, in<module>
survivor(["Andrew", "Brenda", "Craig", "Deidre", "Edward",
"Felicity", "Greg", "Harriet"], 4)
File "<pyshell#45>", line 5, in survivor
next.remove (next[index])
IndexError: list index out of range
Any ideas about whats causing this error?
Big thanks,
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor