3 messages · Page 1 of 1 (latest)
I'm using windows 10 I'm using python
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
and v < len(lis)