Concepts·Certified Entry-Level Python Programmer
Python List Indexing and Slicing
Objective 3.1 is the largest part of PCEP's 25% collections block, and half of it is position arithmetic. Indexes run from 0 and from -1 backwards; slices take a start, a stop and a step, exclude the stop, and - unlike indexing - never raise however impossible the numbers are. Get those two rules straight and most of block 3 becomes mechanical.
Data Collections Guide 13 of 26 Beginner
- Python3.14.4
- OSUbuntu 26.04 LTS
- pip25.1.1
- TimeAbout 16 min
- Reviewed23 August 2026
Written against the versions above. Nothing here has changed in Python 3. Slicing and negative indexing work the same way on lists, tuples and strings, which is why this guide is the foundation for {{guide:tuples-and-immutability}} and {{guide:strings-the-basics}} as well.
| 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
-
Indexing from both ends
-
Indexing out of range, in both directions
-
Slicing
-
A slice never raises
-
Slices as targets: assignment and deletion
-
Membership: in and not in
-
Building a list
-
What the exam does with this half of the objective