Concepts·Certified Entry-Level Python Programmer
Python Tuples and Immutability
Objective 3.2 is short because a tuple is a list you cannot change - the indexing and slicing from the previous guides applies unaltered. What is worth the time is everything around that: `(1)` is not a tuple and `1,` is, immutability does not reach inside the items, and the reason a tuple can be a dictionary key while a list cannot is the single idea the whole objective is built on.
Data Collections Guide 15 of 26 Beginner
- Python3.14.4
- OSUbuntu 26.04 LTS
- pip25.1.1
- TimeAbout 15 min
- Reviewed23 August 2026
Written against the versions above. Unchanged in Python 3. Starred unpacking - `first, *rest = t` - arrived in Python 3.0 and is not on the PCEP syllabus, but it is shown here because it appears in real code and in some practice questions.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RUNNER01 | 192.168.0.27 | Ubuntu 26.04 LTS | Python 3.14.4 - the only machine this path needs | 2 Core | 4 GB | 50 GB |
Before you start
-
Everything a list can do, minus changing
-
The comma makes the tuple, not the brackets
-
Three ways a tuple refuses, three different exceptions
-
Immutable does not reach inside the items
-
A tuple has exactly two methods
-
Unpacking, and the swap it makes possible
-
When unpacking does not fit
-
Why a tuple can be a dictionary key
-
What the exam does with this objective