Strings – Slicing
A slice [start:stop] extracts a substring from position start up to but not including stop
Understanding Strings – Slicing in Python
What it does: Omitting start defaults to 0. Slices from index 0 up to (not including) 3. Step -1 traverses the string backwards — a quick way to reverse. Start at 0, stop before 3: P(0) y(1) t(2). [:2] starts from 0, stops before index 2: h(0) e(1). [3:] starts at index 3 and takes everything to the end: l(3) o(4). Step of 2: take index 0, 2, 4 = a, c, e. Step of -1 reverses the string. Start and stop at the same index — nothing in between.
Common mistakes: Use colon : for slicing, not comma. Step cannot be 0: causes ValueError.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 21–30) and word search (Modules 21–40).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
SliceFill in the Blanks
Spot the Error
Student with a class code? Join your class →