0
Hello! I need to read a data that is in a list at position 13 and is repeated every 15 values. Using the following code I receive error message:
for i in range(0,len(dado),15):
lat = texto.pop(13+i)
The error message is: Indexerror: list index out of range. The array has 15 thousand values, I do not understand why this error :/
Imagine that
dado
has 35 records. Yourfor
will set the sequence 0, 15 and 30, which will cause you to access positions 13 (13+0), 28 (13+15) and 43 (13+30). Heading 43 does not exist in your list.– Woss
humm, interesting. I’m still learning python. I appreciate the help!
– Guilherme Völker