The most elegant way to do this is through slicing.
The first two positions of the indexing represent the starting and ending positions of the cursor. Because they are empty, it is implicit we are traversing the whole string.
The last position of the indexing, "-1", is the step at which the cursor moves through the string.
So the cursor moves one position at a time from the last char to the first