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

After `copy = data.copy()` for a dictionary with a nested list value, which statements are true? Select all that apply.

  1. The outer dictionaries are distinct objects.Respuesta correcta
  2. Every nested object is recursively duplicated.
  3. A nested list value can still be shared.Respuesta correcta
  4. `copy` is merely another name for the same outer dictionary.

Explicación

The call constructs a separate outer dictionary, but its values are copied as references, so a nested list remains shared. Calling this a deep copy incorrectly assumes recursive duplication, while calling it a complete alias ignores the new outer mapping.

Continúa con este test

Empezar la práctica
Pregunta 48: After `copy = data.copy()` for a dictionary with a nested… · Python Fundamentals · Questena