i in range(n) code example Example 1: for i in range start for i in range([start], stop[, step]) Example 2: for loop from n to 1 in python range(10, 0, -1)