The for statement
Syntax and Basic Usage
for item in sequence:
# Code block to be executed for each itemfruits = ["apple", "banana", "cherry"]
for fruit in fruits:
print(fruit)apple
banana
cherryThe Range Function and Numeric Iteration
Advantages of Python's For Loop
Disadvantages of Python's For Loop
Conclusion
Last updated