for-in loop on list
- for
fruits = ["Apple", "Banana", "Peach", "Orange", "Durian", "Papaya"]
for fruit in fruits:
print(fruit)
Apple
Banana
Peach
Orange
Durian
Papaya
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
fruits = ["Apple", "Banana", "Peach", "Orange", "Durian", "Papaya"]
for fruit in fruits:
print(fruit)
Apple
Banana
Peach
Orange
Durian
Papaya