I'm trying to remove all instances of a value ("c") from a list.
letters = ["a", "b", "c", "c", "d"]
for i in letters:
if i == "c":
letters.remove(i)
print(letters)
The output is ["a", "b", "c", "d"] instead of the intended ["a", "b", "d"]
Why is it that only one "c" is removed, and not both/all?