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

For Python variables and types, which statements correctly classify mutability? Select all that apply.

  1. A list is mutable.Respuesta correcta
  2. An integer changes in place when its name is reassigned.
  3. A dictionary is mutable.Respuesta correcta
  4. A string is a mutable sequence of characters.

Explicación

Lists and dictionaries support changes to their existing contents, while integers and strings do not change in place. Rebinding a name from one integer or string to another can look like mutation, but it points the name at a different immutable object.

Continúa con este test

Empezar la práctica
Pregunta 5: For Python variables and types, which statements correctly… · Python Fundamentals · Questena