...

/

Puzzle 13: Explanation

Puzzle 13: Explanation

We'll go over the concept of equality and identity in Python.

We'll cover the following...

Try it yourself

Try executing the code below to verify the result:

Press + to interact
a, b = 12, 3
x=a*b
y=b*a
print(x is y)

Explanation

A Python variable is a name that points to a Python object. When we have two variables (such as x and y), we can ask two questions:

  • Equality: Are the objects
...