I know similar questions have been asked, but this is kind of a trivial case.
Given a text file endcoded with a substitution cipher, I need to decode it using python. I am not given any examples of correctly deciphered words. The relationship is 1-to-1 and case doesn't make a difference. Also, punctuation isn't changed and spaces are left where they are. I don't need help with the code as much as I need help with a general idea of how this could be done in code. My main approaches involve:
- Narrowing down the choices by first solving 1, 2 or 3 character words.
- I could use an list of English words of different sizes to compare.
- I could use frequency distributions of the letters.
Does anyone have an idea of a general approach I could take to do this?