isIntermediate Playground

Identity operator; tests whether two variables reference the same object

Python Playground
Output
Click "Run" to execute your code

'is' is a pointer comparison that cannot be overridden. '==' calls __eq__ which can return anything. Use 'is' for singletons, '==' for value comparison.

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?