Although this will not work out for every Latin word for a pig, as Kevin and Gotti have noted, you can come close to this special 'a' that you add.
First, get rid of the extra 'ay' at the end, as it will drop your search for your special 'a' :
>>> tmp = word[:-2] >>> tmp 'easeapl'
Then use find or index to get the location of this special 'a' . Note that it will search from the beginning of the line, so you should temporarily change the line:
>>> tmp = tmp[::-1] >>> tmp 'lpaesae' >>> ind = tmp.index('a') >>> ind 2
Now, take the part to the left of this index and the part to the right of this index, cancel each of them and build. These pieces start to get pretty tricky, so bear with me:
>>> prefix = tmp[ind-1::-1] >>> prefix 'pl' >>> suffix = tmp[:ind:-1] >>> suffix 'ease' >>> english = prefix + suffix >>> english 'please'
For more information about the cut, see this excellent answer .
source share