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 #605
print(id(1) == id(True))
Even though False and True behave like the integers 0 and 1 respectively, True does not occupy the same memory address as 1 . (python.org/dev/peps/pep-0285)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) December 5, 2020
print(id(1) == id(True))
False
True#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: