angeo
answered Aug 6 '21 00:00
range(start,stop,step) function can have three argument .
step is default value is 1 if you don't pass anything at third parameter then it takes 1 as step increment from start to stop
so in your case, you when you pass start and stop value which is start>stop and it never generates any range because 1 increment
but if we change step to -1, it will generate range for start>stop
so i use range(12,0,-1) which generate reverse range.
for n in range(12,0,-1):
print(n)
it will print
12
11
10
9
8
7
6
5
4
3
2
1