how to return a sentence with words reversed 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])