Python For Loop Syntax and Examples
Published on Feb 26, 2022
In computer science, a for-loop (or simply for loop) is a control flow statement for specifying iteration, which allows code to be executed repeatedly.
Table of Contents
for item in sequence: execute expression
for i in range(1,6): print(i)
items = ["apple","banana","egg"] for index, item in enumerate(items): print(index,item)