Challenge: Favorite Things
Explore how to create lists to store multiple favorite things and use for loops to iterate through each item. Understand how loops automate repetitive tasks by printing sentences for each favorite item you define in Python.
We'll cover the following...
Lists let you store multiple related values under one name.
Loops let you do something with each value automatically.
In this challenge, you’ll use both together.
Your task:
Create a list containing a few of your favorite things (like hobbies, foods, or activities)
Use a
forloop to go through the listFor each item, print a sentence that mentions it
💡 Things to keep in mind:
Lists are written using square brackets
[]A
forloop gives you one item from the list at a timeThe same
print()statement will run once for each item
Example output (yours can be different):
One of my favorite things is reading.One of my favorite things is coding.
When you click Run, your program should print one sentence per item in your list.