list = [0, 1, 2, 8, 2, 9, 2]
Is there a way to remove the element 2
, exactly one time?
So you will get:
list = [0, 1, 2, 8, 9, 2]
I tried to work with index()
but I didn't found it.
It can be a RANDOM 2
.
So I can't use remove()
or pop()
because it will not remove the number 2
on a random position.