0
Q:

python range from n to 0

for i in range(start, end):
    dosomething()
#The i is an iteration variable that you can replace by anytthing. You do not need to define it.

 
4
print("using start, stop, and step arguments in Python range() function")
print("Printing All odd numbers between 1 and 10 using range()")
for i in range(1, 10, 2):
    print(i, end=', ')
2
range(N, -1, -1) is better
0

New to Communities?

Join the community