The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #128
a = []
b = []
print(a is b)
As [] is a mutable object (list), 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. (towardsdatascience.com/assignment-shallow-or-deep-a-story...)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) June 17, 2020
a = []
b = []
print(a is b)
False
True#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: