Question #129

What is the output of the code snippet below?
a = {}
b = {}
print(a is b)

As {} is a mutable object (dictionary), Python creates a new memory address for each object created. As both a and b refer to different objects, they are not considered as the same object by Python. (

Comment on Disqus:

Comment on Twitter:

Question difficulty: 🔵🔵🔵🔵🔵

Similar questions: