Can range generate numbers in descending order

 def reverse(text):
    length = len(text) - 1
    new = " "
    for i in range(length, 0):
        new = new + text[i]
    return new

this was my code in 7/15 reverse. but the code only returns " ". i dont understand why it doesnt concatenate the last letter of the string(represented by the variable length) to " ".

i am assuming that in the for loop, range function cannot generate numbers in decreasing order because this code perfectly works with while loop.

can anyone confirm this? or is there another bug in the code?


try this:
for i in range(length, 0):
for i in range(length, 0-1,-1):

Good luck!