QuestenaÜben und erkennen, was als Nächstes dran ist
Frage 5

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

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

Erklärung

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.

Mit diesem Test weitermachen

Übung starten
Frage 5: For Python variables and types, which statements correctly… · Python Fundamentals · Questena