- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Core Tech
Lists and Loops in Python
Build a small Python packing list helper that demonstrates core list operations and loop patterns. You will complete a guided set of functions for creating, updating, checking, and displaying packing data, then verify each change with focused pytest checks.
Lab Info
Table of Contents
-
Challenge
Step 1: Get oriented with the packing helper project
This lab starts with a lightweight Python project that focuses on one of the most important beginner-friendly data structures: the list. Your goal is to turn an incomplete module into a small but useful packing list helper that can create item collections, update them safely, inspect values by position, and display the results in readable text form.
-
Challenge
Step 2: Create and read ordered packing lists
This step establishes the foundation for the rest of the lab by focusing on how lists are created and how their ordered contents are accessed. Before you can update or display data, you need confidence in how list values are added and how positions are counted.
-
Challenge
Step 3: Update lists with membership and deletion rules
This step focuses on controlled list mutation. Once a list exists, most practical programs need to add values conditionally, remove values when plans change, and decide whether a requested update is valid before performing it.
-
Challenge
Step 4: Check list contents and render simple output
This step shifts from mutating data to communicating information about it. Many small utilities are valuable not because they store lists, but because they can answer questions like "Is this item already present?" and present the stored values in a readable format.
-
Challenge
Step 5: Organize and display grouped packing sections
The final step introduces nested lists, which let you represent grouped data while still using the list operations you already know. A flat list is perfect when every item belongs to the same category, but many real-world collections naturally fall into sections such as clothing, toiletries, and gear.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.