BaşlayınÜcretsiz Başlayın

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.

Bu egzersiz

Introduction to Python for Developers

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

ingredients = ["fusilli", "tomatoes", "garlic", "basil", "olive oil", "salt"]

# Loop through each ingredient in the list
for ____ in ____:
    print(item)
Kodu Düzenle ve Çalıştır