+1 vote
in Python by

How do I write a for loop in Python?

1 Answer

0 votes
by

A for loop in Python has the following syntax:

yaml

for item in sequence:

    # code to execute for each item in the sequence

...