August 2021
Beginner to intermediate
118 pages
1h 29m
English
| Puzzle 13 | Identity Crisis |
| | a, b = 12, 3 |
| | x = a * b |
| | y = b * a |
| | print(x is y) |
Guess the Output | |
|---|---|
|
|
Try to guess what the output is before moving to the next page. |
This code will print: True
A Python variable is a name pointing to a Python object. When you have two variables (such as x and y), you can ask two questions:
Are the objects these variables point to equal? (the == operator)
Do these two variables point to the ...
Read now
Unlock full access