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.
Questo esercizio fa parte del corso
Introduction to Python for Developers
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
ingredients = ["fusilli", "tomatoes", "garlic", "basil", "olive oil", "salt"]
# Loop through each ingredient in the list
for ____ in ____:
print(item)