python string reverse

# in order to make a string reversed in python 
# you have to use the slicing as following

string = "racecar"
print(string[::-1])

Here is what the above code is Doing:
1. string[::-1] -> this means start at the end of the string and end at the beginning, moving with a step size of -1 (or one step backwards).
2. string[::1] -> this means start at the beginning of the string and end at the end, moving with a step size of 1 (or one step forward).
3. string[::2] -> this means start at the beginning of the string and end at the end, moving with a step size of 2 (or two steps forward).
4. string[::-2] -> this means start at the end of the string and end at the beginning, moving with a step size of -2 (or two steps backwards).