+ 1
How range() works with negative step?
4 Réponses
+ 4
//range(start, stop, step)
print(list(range(0,-10,-1)))
0
Invalid error
0
Hi Aniket!
San's code is working fine. Please check it again. You may miss something.
Alternatively, you can try like this
print(list(range(10,0,-1)))