Coding tips
Python is vs == (Identity vs Equality): Differences, the 256 Integer Cache, None Checks and SyntaxWarning Explained (Tested Examples)
In Python, == checks whether two values are equal, while is checks whether two names point to the very same object. Here is how they differ with lists, integers, strings, None and NaN, with real output from Python 3.13, plus the SyntaxWarning you get for is with a literal.