A string can also be said as a list of letters...
To get some part of a list:-
List[start(default=0) : end(default=len(List)) : step(default=1)]
So with this we are decreasing our steps by putting -1....
For understanding we can also type:
Try this code(this code is available for a sentence too andi not only words)
sentence_in_english = input()
sentence_inverse = 
for word in sentence_in_english.split():
word_inverse = word[::-1]
sentence_inverse += word_inverse
It is so easy to reverse a word but if we need to reverse all words in a sentence, the code would be like this:
ourlang=input('Enter the sentence to be converted:')
for i in k: