Skip to lesson content
Dev4Hub

Lesson 10 of 11

Python For Loops

1 min read1 sectionAI tutor ready

The for Loop

A for loop is used for iterating over a sequence (that is either a list, tuple, dictionary, set, or string).

For loop

Python
fruits = ["apple", "banana", "cherry"]
for x in fruits:
    print(x)

Output

apple
banana
cherry

You've reached the end of this lesson.

Mark it complete to keep your place in the course — it counts toward your progress and your streak.