Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Index Error: list index out of range (Python) [duplicate]

I am a beginner programmer and im not sure what this means...

Index Error: list index out of range

like image 480
user2280738 Avatar asked Apr 14 '13 23:04

user2280738


1 Answers

Generally it means that you are providing an index for which a list element does not exist.

E.g, if your list was [1, 3, 5, 7], and you asked for the element at index 10, you would be well out of bounds and receive an error, as only elements 0 through 3 exist.

like image 109
phoebus Avatar answered Oct 18 '22 14:10

phoebus