Hello again @frightningfedoras ,
== operator checks whether two objects are considered to be equivalent.
is operator checks whether they are actually stored as the same object.
If what we consider to be two strings consist of the exact same sequence of characters, they are equivalent, and the
== operator can verify that. The two equivalent strings might also be the same object, but they might not be. See the following experiment ...
# Experiment: equivalence and identity of strings
a = "Los" + " " + "Angeles"
b = "Los Angeles"
# Show that strings a and b look alike
# Are they equivalent? (yes)
print a == b
# Are they the same object? (might not be)
print a is b
In the above, the strings were equivalent, but the Python interpreter stored them as two separate objects. So, in general, when you want to check whether two strings consist of the same sequence of characters, use the