Question #605

What is the output of the code snippet below?
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)


Comment on Disqus:

Comment on Twitter:

Question difficulty: 🔵🔵🔵🔵🔵


Similar questions: