QuestenaPráctica que te muestra qué repasar después
Pregunta 119

After list = [] executes in a scope, what does the name list resolve to in that scope?

  1. The built-in type, because built-ins cannot be rebound
  2. Both objects at once, chosen by call context
  3. The newly bound empty list objectRespuesta correcta
  4. No object, because the assignment is ignored

Explicación

The assignment places a user binding named list in the current scope, so normal lookup finds that empty list object before the built-in type. Built-in names are ordinary names that can be shadowed; they do not automatically take precedence.

Continúa con este test

Empezar la práctica
Pregunta 119: After list = [] executes in a scope, what does the name… · Python Fundamentals · Questena