You can try this.
mystr = "illusion never changed into something real wide awake and i can see the perfect sky ees torn you are a little late I'm already torn"
def reverse(word):
letter = list(word)
length = len(letter)
y = []
for x,w in enumerate(letter):
y.append("".join(letter[(length-1)-x]))
return("".join(yy for yy in y))
words = mystr.split()
for word in words:
if (reverse(word)) in words and len(word) > 1: # len(word)>1 is for ignoring a word that contains only one letter, e.g. 'I' and 'a'.
print ("'" + word + "' is the reverse of '" + reverse(word) + "'")
Output:
'see' is the reverse of 'ees'
'ees' is the reverse of 'see'
You can also try the simpler one as suggested by @Nuhman.
mystr = "illusion never changed into something real wide awake and i can see the perfect sky ees torn you are a little late I'm already torn"
words = mystr.split()
for word in words:
if word[::-1] in words and len(word) > 1:
print ("'" + word + "' is the reverse of '" + reverse(word) + "'")
Output:
'see' is the reverse of 'ees'
'ees' is the reverse of 'see'