Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
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])