Back to feed

Python Mutable and Immutable Types Explained

Real Python
Python Mutable and Immutable Types Explained

EDITOR BRIEF

The article explains how mutable and immutable data types work in Python and how each can be used in code.

INSIGHTS

Understanding mutability helps you choose how data should behave when your program changes it. Try modifying a list and a tuple to compare the results.

CodeFriends courses that build on this story. Practice in the browser with nothing to install.

COMMENTS

0/40
0/2000

Loading comments…