Compilation Units: Behavior of the Python ‘is’ Operator in a Script vs. the Interactive Interpreter

In this brief video tutorial, we address the question as to why the ‘is’ operator will return one set of values when used in the Interactive Interpreter and another, different, set of values when used in a Python script. It all comes down to Python ‘compilation units’ and how Python ‘folds together’ identical values at runtime. Enjoy!