Source Code:
(back to article)
string = "hello" reversed_string = "" for i in range(len(string) - 1, -1, -1): reversed_string += string[i] print(reversed_string) # Output: "olleh"
Result:
Report an issue