simple program to reverse a string with index in python code example Example: how to reverse string in python txt = "Hello World"[::-1] print(txt)