[Solved] Python single line for loops [duplicate]


This would be the equivalent in python. In range(0, height, cellSize), 0 and height are the bounds of the range, and cellSize is how many out counter increments.

for y in range(0, height, cellSize):
    for x in range(0, width, cellSize):
        rect(x, 0, cellSize, cellSize)

5

solved Python single line for loops [duplicate]