QuestenaPráctica que te muestra qué repasar después
Pregunta 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.Respuesta correcta
  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.

Explicación

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.

Continúa con este test

Empezar la práctica
Pregunta 117: Why does x is None distinguish None reliably from other… · Python Fundamentals · Questena