How to not filter a list in Python

Timur Bakibayev, Ph.D.
Level Up Coding
Published in
4 min readDec 22, 2020

--

A common mistake that leads to a bug

I have recently written an article with a bug investigation that shows a surprising scope of variables in classes.

Today, I want to show another bug that is frequently made not only by beginners but also by some “senior” developers — mostly because of laziness.

We will try to filter a list by some criteria, what can be simpler, and how can someone generate a bug here?

--

--