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])
1def reverse_string(str):
2 return str[::-1]
3print(reverse_string("This string is reversed!"))