Mutable means "changeable." When you have a mutable object, you can modify its contents—add, remove, or change elements—without having to create a new object in memory.
- Analogy: Think of a whiteboard. You can easily erase a word or add a new drawing to the same whiteboard. The whiteboard itself remains the same object.
- Examples from your Canvas:
- Lists: The fruits_list is mutable. The code shows how you can change an element (fruits_list[1] = "blueberry") and add a new one (fruits_list.append("orange")) directly to the original list.
- Dictionaries: The person dictionary is mutable. You can add a new key-value pair (person["email"] = "Neha@example.com") and update an existing value (person["age"] = 30).
- Sets: The unique_fruits set is mutable. You can add new items (unique_fruits.add("orange")) and remove existing ones (unique_fruits.remove("banana")).