You can use Python’s extended slices feature to reverse a string. For example, run the following command on Python console, you will see the result the revere of string.
>>> 'Hello Python'[::-1]
You can also use the same in your Python script. Here is a sample python script where we reverse the string and store the results in another variable.
Execute the Python script on command line and see the results.
python a.py nohtyP olleH