Unit 3 Task 10 - Solution

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Solution - Task 10: Reading list slices

← Back to task


One possible program:

chapters = [10, 20, 30, 40, 50, 60]

print("First three:", chapters[:3])
print("Last two:", chapters[-2:])
print("Middle (index 2-4):", chapters[2:5])