So i made a translator that takes an English sentence, moves the last letter to the front, adds mu after each word and then adds emu after every three words. Now I would like to do the opposite. I cant seem to get past the part of now moving the first letter of the word to the end of the word. I was under the impression from this stack overflow post How to move the first letter of a word to the end that by using word[1:] + word[0] I could accomplish this, but I tried to implement this and it didn't seem to do anything.
Here is my current code:
sentence = 'imu odmu tnomu emu wknomu whomu otmu emu odmu sthimu'
#This is the result of the english translated sentence
#Get rid of mu and emu
sentence = sentence.replace('mu', '')
sentence = sentence.replace('e ', '')
#I would like this to move the first letter of each word to the end
print("".join([words[1:] + words[0] for words in sentence]))
#Current output i od tno wkno who ot od sthi
#Expected Output i do not know how to do this
Just curious if someone can help explain to me what I'm missing here