How does the range function reverse the string? I understand that range can intake a: start, stop, step - form. I am trying to understand the way it can reverse the string using the negative integers.
Thank you!
def reverse_string1(a_string):
result = ''
for index in range(len(a_string)-1, - 1, -1):
result += a_string[index]
return result
string_practice = 'Lucky Doggo!'
print(reverse_string1(string_practice))