Looping through a list
You're doing a trial run of cooking the pasta dish. First, you need to list all your ingredients to make sure you have everything ready.
Then, you'll add them one by one as you cook — seven ingredients in total.
This exercise is part of the course
Introduction to Python for Developers
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
ingredients = ["fusilli", "tomatoes", "garlic", "basil", "olive oil", "salt"]
# Loop through each ingredient in the list
for ____ in ____:
print(item)