I have a list which contains unique strings. I want to remove a given string (if found in the list) from this list but do not want to change the indicies of all other elements in the list.
So I figure that I should just replace the given (and found) string with a None
.
What's the most efficient way to do so? I thought about list comprehension, but could it be a bit overkill for just one element?