in Python by (23.9k points)

How do I write a for loop in Python?

1 Answer

0 votes
by (23.9k points)

A for loop in Python has the following syntax:

yaml

for item in sequence:

    # code to execute for each item in the sequence

Related questions

0 votes
asked Feb 13 in Python by rajeshsharma (23.9k points)
0 votes
...