Time: 0:00
This is a logic errors bug
The wrong operator, an inverted condition, a formula the right way round but backwards.
list.remove(x) removes the first matching item only, then stops. It is easy to read it as "remove x from the list", but the documentation is precise: the first occurrence. To remove every copy, build a new list that keeps everything else, which a list comprehension does in one line. Do not fix it by calling remove() inside a for loop over the same list: deleting while iterating shifts the remaining items and skips some of them, a different and sneakier bug.
The pattern behind it: logic errors.
Paste this into any web page or blog post. Visitors fix the bug right there, in their browser.
<iframe src="https://trybughunt.com/embed/b81f5d70-05ac-4da5-afd6-bdc62176bdfb" title="Debugging challenge: Spam filter lets the second one through" width="100%" height="580" loading="lazy" style="border:1px solid #d4d4d8;border-radius:12px;max-width:760px"></iframe>
<p style="font-size:14px">Debugging challenge from <a href="https://trybughunt.com/challenges/b81f5d70-05ac-4da5-afd6-bdc62176bdfb">BugHunt</a></p>