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`.
Glossary: Python Beyond the Basics
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`.