python loop through range of 30 code example Example 1: for loop from n to 1 in python range(10, 0, -1) Example 2: python range from n to 0 range(N, -1, -1) is better