Language
Python
Compiler
CPython 3.6.2
Options
$ python3 prog.py
I will remove 0th elem from ['a', 'b', 'c', 'd', 'e', 'f', 'g']
I will remove 2th elem from ['b', 'c', 'd', 'e', 'f', 'g']
I will remove 4th elem from ['b', 'c', 'e', 'f', 'g']
I will remove 6th elem from ['b', 'c', 'e', 'f']
Traceback (most recent call last):
File "prog.py", line 7, in <module>
remove_evenindex(["a", "b", "c", "d", "e", "f", "g"])
File "prog.py", line 4, in remove_evenindex
ln.remove(ln[j])
IndexError: list index out of range
Exit Code:
1