I am trying to create a program in python in which the user enters a sentence and the reversed sentenced is printed. The code I have so far is:
sentence = raw_input('Enter the sentence')
length = len(sentence)
for i in sentence[length:0:-1]:
a = i
print a,
When the program is run it misses out the last letter so if the word was 'hello' it would print 'olle'. Can anyone see my mistake?