Python Functions · Week 4 — Working with Lists
Functions that take a list, loop inside, and build/return a new list.
Week 4: Functions with Lists
This week, you’ll learn how to make your functions even smarter by giving them a list of items to work with. You’ll use loops to go through each item, build brand-new lists, and return them. Along the way, you’ll help Aisha with her mystery books, Paul with his jersey numbers, and Emma with Miami weather—let’s get started!
Learning goals
- Pass a list as a function argument. - Use a for loop to process every item in the list. - Build a new list with append() and return it. - Apply conditions to filter items into a new list. - Transform data from one type to another inside a function.
Preview truncated — download the notebook to see the full lesson.