QuestenaPractice that shows what to review next
Question 5

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

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

Explanation

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.

Continue with this test

Start practice
Question 5: For Python variables and types, which statements correctly… · Python Fundamentals · Questena