Figuring out whether two things are the same or not might seem like it should be the easiest job in the world. Unfortunately that's not the case. Equality, identity, and comparisons are surprisingly complicated topics in any programming language. Python is no exception.
Our goal in this class is to introduce some of the subtleties that come up when talking about these topics. The approaches to handling these subtleties, and the syntax we'll use, are specific to Python. While they might present in different ways, these issues appear in any programming language, so let's try not to get too bogged down in Python specifics!
Equality vs identity (on literals)
Python integers, strings, and boolean values are literals: they're immutable values stored directly in memory. If we assign
a = 365
b = 365