01.05 · Create and access lists / Practice · 17 min
Select movies, a middle slice and alternate letters
A watchlist, number sequence and letter sequence each need a different selection.
Activity 5 of 5 in Create and access lists
Python 3: Lists / 01.05
List access challenge
Not started
Apply all three original access tasks with predictable inputs and clear slice boundaries.
Your lesson progress
Empty: not started. Yellow: in progress. Green: complete. Marking the whole activity complete does not replace your test results. These circles save in this browser for this pilot.

ORIGINAL WALKTHROUGH · 17:17
Watch with Rob.
Pause whenever you want to try a change. You can return to the lesson at any time.
You are signed in, but video access needs attention. Check your account access. Your saved work is kept.
Video walkthroughs are included with an active Code Zone membership. The written lesson and practice are free.
Open video & code editor (opens in a new tab)Your task: three original challenges
Keep the five supplied movie titles. Store the first and last movies using positive indexes in first_positive and last_positive, then using negative indexes in first_negative and last_negative. Print those four results in that order.
Keep numbers as 10 through 100 by tens. Assign indexes 3 through 5 to middle_numbers using a slice and print it. For this ten-item list we explicitly mean [40, 50, 60].
Keep letters as a through j. Assign every second item, starting with a, to alternate_letters and print it. The expected list is ['a', 'c', 'e', 'g', 'i'].
Try first, then review Rob’s recording
Watch the original 17:17 challenge walkthrough above. The original Solution Code resource remains in Skool. The website uses fixed titles rather than your personal movie choices so the checks can compare results. Use the separate open workspace when following the source recording.
The checks inspect fixed output and stored values, not the spelling of your index expressions. After passing, change a movie title and predict which results change. Restore the starter inputs for the fixed checks.
Build it one step at a time
Prefer learning by typing? Work through short instructions, run the Python code and check each change before continuing. Your guided project saves separately from the challenge below.
The mini-lesson opens in a new tab. Your own code carries forward; each step has a focused check and an optional hint.
Start mini-lesson(opens in a new tab)5 steps · Saved work · Instant feedback
YOUR TURN
Select list items and slices
Preserve the three input lists. Store and print the four movie endpoints, then middle_numbers [40, 50, 60] and alternate_letters a, c, e, g, i.
Orbit Byte Orbit Byte [40, 50, 60] ['a', 'c', 'e', 'g', 'i']
Keep the starting inputs. Print these lines in this order, without extra output.
- Store Orbit in first_positive
- Store Orbit in first_negative
- Store Byte in last_positive
- Store Byte in last_negative
- Include exactly three middle values
- Start the alternate letters at a
Edit Python, then run it. Check challenge checks your output and the listed Python requirements. Your code saves on this browser after a short pause. Sign in and choose Save account draft to keep it across devices. Word wrap is enabled.
Ready to checkRun the checks to see your results here.
Your check results
Need a nudge?
Count the positions
Five items have positive indexes 0 to 4 and negative indexes -5 to -1.
Stop after the final wanted index
Select indexes 3, 4 and 5 with stop 6. A step of 2 starting at the beginning selects a, c, e, g and i.
One possible solution
Your code may look different and still be correct. Compare the approach with your own.
Each selected value follows the position rule. The slice stop remains excluded, even when it is the last boundary you write.
Walk through the fix.
Choose Next to inspect one change at a time. Highlighted lines show what to notice. Your editor stays unchanged unless you choose to load a step.
Step 1 of 2
Read the inputs
Preserve the three input lists. Store and print the four movie endpoints, then middle_numbers [40, 50, 60] and alternate_letters a, c, e, g, i.
movies = ["Orbit", "Spark", "Loop", "Pixel", "Byte"]
numbers = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]Expected output for this step
(No output)
Build the requested result
Each selected value follows the position rule. The slice stop remains excluded, even when it is the last boundary you write.
movies = ["Orbit", "Spark", "Loop", "Pixel", "Byte"]
numbers = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
first_positive = movies[0]
last_positive = movies[4]
first_negative = movies[-5]
last_negative = movies[-1]
middle_numbers = numbers[3:6]
alternate_letters = letters[::2]
print(first_positive)
print(last_positive)
print(first_negative)
print(last_negative)
print(middle_numbers)
print(alternate_letters)Expected output for this step
Orbit Byte Orbit Byte [40, 50, 60] ['a', 'c', 'e', 'g', 'i']
See the complete solution
movies = ["Orbit", "Spark", "Loop", "Pixel", "Byte"]
numbers = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
first_positive = movies[0]
last_positive = movies[4]
first_negative = movies[-5]
last_negative = movies[-1]
middle_numbers = numbers[3:6]
alternate_letters = letters[::2]
print(first_positive)
print(last_positive)
print(first_negative)
print(last_negative)
print(middle_numbers)
print(alternate_letters)Ready to try it?
Practice in your browser and see your results.
Progress details
Have a question?
Ask the Code Zone community.
Ask a question in The Code Zone (opens in a new tab)