#List index out of range

3 messages · Page 1 of 1 (latest)

languid shoal
#

I'm using windows 10
I'm using python

mild cargo
#

If len(lis) is 4 and v is 3, then v will be incremented by 1 to 4 and you'll get an index error

#

I'd add a check to the while loop and v < len(lis) so the loop stops when v is out of range