Real Python1 min readintro
Quiz: Python's Mutable vs Immutable Types: What's the Difference?
Summary
The page offers a 12‑question interactive quiz that checks knowledge of Python’s mutable vs immutable types, covering built‑in type categories, aliasing pitfalls, mutable default arguments, and shallow copy behavior.
- Mutable objects can be changed in place; immutable objects cannot.
- Built‑in mutable types include list, dict, set; immutable types include tuple, str, int.
- Using a mutable default argument can cause unexpected state sharing across calls.
- Shallow copies duplicate container structure but not nested mutable objects.





