how to reverse strings in python code example
Example 1: python reverse string
'String'[::-1] #-> 'gnirtS'
Example 2: reverse the words in a string python
string = 'hello people of india'
words = string.split() #converts string into list
print(words[::-1])