I am retrieving a list of numbers (scores) as well as a separate list of corresponding games.
Some of the scores are -1 in the scores list.
These -1 scores need to be deleted and I need to delete the corresponding game element.
I have tried the following:
for i, score in enumerate(scores):
if score<0:
del scores[i]
del games[i]
However everytime I run the above.. it I always still have one game and score (in scores list) which has a score of -1.
There is always one left, all others get deleted and I've tried for different scores and games lists.
Any ideas on why this is happening? Thanks.