Write a function pirate (e) that translates from English to Pirate, using following dictionary; those words that
Question:
Write a function pirate (e) that translates from English to Pirate, using following dictionary; those words that are not in the dictionary should remain unchanged:
You may assume that the input consists only of lowercase characters. When translating, replace only whole words, like sir or phrases, like how far, but not, for example, sir in desire. For this, consider all characters that are not letters to be separators (for example punctuation). In Python, all characters between 'a' and 'z' are letters, so everything less than 'a' or greater than 'z' is a separator. The same word or phrase can appear multiple times in a sentence, but be careful to avoid translating a translation: pardon my officer should become pardon me foul blaggart and pardon me should not be translated further.