Post

@PythonPr Answer: C
Solution: The difference between `is` and `==` confuses many.
Key is to understand how names and values work in python.
Think of values as things. Like, say suitcases.
And, names are like label tags put on these suitcases.
The value is the actual "thing" (data)
+
English

@PythonPr and the name is simply the label tag, that allows us to talk about the thing, ie, label tag is the variable name.
A label is useful only if is unique, ie, a name can only refer to one value.
However, you can attach multiple labels to the same suitcase, ie,
+
English

@PythonPr a value can have multiple names.
But a name can only refer to one value.
Coming back to `is`... it checks whether two variables refer to the same value in memory.
"Are these two labels on the same suitcase?"
On the other hand,
+
English

@PythonPr `==` doesn't care if the labels point to same or different value.
It checks only for equality.
"Is the content value of one variable equal to that of another?"
Thus, `==` tests for equality. And `is` tests for identity.
Coming back to the question,
d1 and d2 are dicts
+
English

@PythonPr having the same key-value pairs.
Hence they are equal by ==.
`d1 == d2` is True.
However, they are initialized separately.
So they are not two names of the same value.
Hence, `d1 is d2` is False.
Thus the answer is
False True
English

