I've seen these before and every single time, it's mostly based on a misunderstanding of certain language features that only a beginner coder would do (for example, not knowing that Python does not do block-level variable scoping, so loop variables leak) or an abuse of an implementation detail (for example, integers under 255 being singletons).
"is" is not the same as "==". Confusing the two is a rookie mistake, yet is treated like a "gotcha".
> not knowing that Python does not do block-level variable scoping, so loop variables leak
For what it's worth, it took me a long time to internalize this (more than ten years after first learning Python), I think partly because the way most people teach Python is to say what scopes Python has instead of saying what scopes it doesn't have. While it's bad style to abuse this, I would definitely consider this a part of Python that a lot of working developers probably don't understand well.
"is" is not the same as "==". Confusing the two is a rookie mistake, yet is treated like a "gotcha".