title: Transposition Cipher Advanced Application Inquiry
body: <p>I faced some problems while trying to make some further applications on the transposition cipher. I wanted to create a program that allows me to cipher the &quot;secret code&quot; with unknown key. Although I was able to devise a way to print out all the possible code, it was too long and tedious to search for the correct plain text.</p>
  <p>Thus, I wanted to read the text file named dictionary (which includes all words from the dictionary) and compare the printed codes to figure out one and only correct answer code. In other words, I would want the Python program to check all the words from printed codes and if included in the dictionary, print it out.</p>
  <p>Here is my project so far:</p>
  <pre><code>from pathlib import Path
  my_dictionary = open(Path.home() / 'dictionary.txt', 'r')
  my_words = my_dictionary.read()
  my_dictionary.close()
  
  cipher_text = 'A ohtsS ommyvt t i nt snat,tcfps eonroaa eseere ro u,nr uiflrudtq arsimdt etnmntles ruocsynmaeae ubgey ediert,mgotrndsmesn trann e bsna d tbr ,wa-tgcmrno   p tresf hkga eosulafirwoir aeeie.i r msronoe nstisnnnAsoe(b)er g cg orp geA f le. mcrmoso lew rAa cer a oaan rsyceiaA'
  plain_text = ''
  key = len(cipher_text)
  
  for u in range(1, key):
      divider = int(len(cipher_text)/u)
      for k in range(divider):
          for i in range(u):
              plain_text += cipher_text[k + i*divider]
      print(plain_text)
  </code></pre>