1# in order to make a string reversed in python
2# you have to use the slicing as following
3
4string = "racecar"
5print(string[::-1])
6
1string = 'hello people of india'
2words = string.split() #converts string into list
3print(words[::-1])
1str="Python" # initial string
2stringlength=len(str) # calculate length of the list
3slicedString=str[stringlength::-1] # slicing
4print (slicedString) # print the reversed string