reversing words in a string in python code example
Example: reverse the words in a string python
string = 'hello people of india'
words = string.split() #converts string into list
print(words[::-1])
string = 'hello people of india'
words = string.split() #converts string into list
print(words[::-1])