len(primes primes[ primes[ traceback (most recent call last)file ""line in indexerrorlist index out of range type of error description of error you get an error unsurprisingly the type of the error is an "indexerror-something went wrong with an index the error message specifies that the index asked for was outside the valid range