Guide
Python
Beginner
Lists: Chapter Practice
Apply lists with a mini lab and knowledge check.
Mini lab
Filter unhealthy server names into a new list.
Expected output: [‘web-01’, ‘web-02’]
Hint
Use the chapter examples to choose the operation, then run your version before opening the solution.Show solution
names = ["web-01", "db-01", "web-02"]
print([name for name in names if name.startswith("web-")])
Knowledge check
What does list.append() return?
Check your answer
None; it mutates the existing list.Finish the chapter
- Explain each operation without reading the lesson.
- Change the sample input and predict the output before running it.
- Revisit the chapter if the result differs from your prediction.
Add More Questions to This Guide
Know a question that should be here? Share it and help the community!
Open Google Form