QuestenaPractice that shows what to review next
Question 117

Why does x is None distinguish None reliably from other falsy values such as 0 and an empty list?

  1. None is a singleton, so identity singles it out.Correct answer
  2. Every falsy value is another spelling of None.
  3. x == False and x is None always mean the same thing.
  4. Identity converts every falsy value to None.

Explanation

None has a single shared identity, so the test asks specifically whether x refers to that singleton. General falsiness is broader: zero and an empty list are falsy but are different objects and meanings.

Continue with this test

Start practice
Question 117: Why does x is None distinguish None reliably from other… · Python Fundamentals · Questena