QuestenaÜben und erkennen, was als Nächstes dran ist
Frage 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.Richtige Antwort
  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.

Erklärung

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.

Mit diesem Test weitermachen

Übung starten
Frage 117: Why does x is None distinguish None reliably from other… · Python Fundamentals · Questena