Name

for

Examples
for i in range(40):
    line(30, i, 80, i)
for i in range(0, 80, 5):
    line(30, i, 80, i)
for i in range(40, 80, 5):
    line(30, i, 80, i)
# Nested for() loops can be used to
# generate two-dimensional patterns
for i in range(30, 80, 5):
    for j in range(0, 80, 5):
        point(i, j)
nums = [5, 4, 3, 2, 1]
for i in nums:
    print(i)
Description
Syntax
for var in iterable:
    statements

for var in iterable:
    statements
Parameters
var
iterable
statements
Related while
Updated on Wed Jan 18 17:32:20 2017.
Creative Commons License