List Modification Simulator
Practice changing list elements. Try commands like items[0] = "New"
, items.append("End")
, or items.insert(1, "Middle")
.
This demonstrates list Mutability.
items
= ["Laptop"
, "Keyboard"
]List Slicing Explorer
Experiment with list slicing! Enter start, end, and step indices (leave blank for defaults). See the resulting sub-list. Negative indices work too!
elements
= ["A"
, "B"
, "C"
, "D"
, "E"
, "F"
]Method Match-Up
Drag the list method name to its correct description or action. Understanding methods is key to efficient list manipulation.
Advanced List Missions!
Apply your knowledge of list modification and methods to solve these challenges. Check the output carefully!
Adv Mission 1: Append and Print
Create a list `gadgets = ["Phone", "Watch"]`. Then, append the string "Tablet" to the list. Finally, print the entire `gadgets` list.
Adv Mission 2: Pop and Print
Create a list `scores = [85, 92, 78, 99]`. Use the `pop()` method to remove and retrieve the *last* score. Then, print the score that was removed.
Adv Mission 3: Insert and Check Length
Create a list `queue = ["Alice", "Charlie"]`. Insert "Bob" at index 1 (between Alice and Charlie). Then, print the length of the updated `queue` list.
Module 10 Advanced Practice Complete!
Fantastic! You've practiced modifying lists, slicing them, and using key methods. These are powerful tools in Python.
Review the standard practice or watch the video lesson if needed, or proceed to the next module!