- #1
dmatador
- 120
- 1
lists = [(2 * i + 1) for i in range(100)]
i = 0
while (i < 100):
if(lists == 3):
lists.remove(lists)
i = i + 1
print lists
It is giving me an error about the index being out of range. I am new to python and I am not understanding this error.
Edit: Fixed it. This is by no means messy. Pretty simple stuff. Stupid error on my part.
i = 0
while (i < 100):
if(lists == 3):
lists.remove(lists)
i = i + 1
print lists
It is giving me an error about the index being out of range. I am new to python and I am not understanding this error.
Edit: Fixed it. This is by no means messy. Pretty simple stuff. Stupid error on my part.
Last edited: