Skip to content

Glossary: Python Beyond the Basics

is vs ==

Also written: is, identity, ==

`==` asks whether two values have the same contents, while `is` asks whether they are the very same object. Use `is` mainly to check for `None`.

Where the book teaches it

Related terms

objectmutable / immutable