arnold/book cipher with python

后端 未结 2 1541
被撕碎了的回忆
被撕碎了的回忆 2021-01-14 04:57

I\'m trying to write a book cipher decoder, and the following is what i got so far.

code = open("code.txt", "r").read() 
my_book = open(&q         


        
2条回答
  •  半阙折子戏
    2021-01-14 05:33

    You already know how to read in the book file, break it into lines, and break each of those into words.

    If paragraphs are defined as being separated by "\n\n", you can split the contents of the book file on that, and break each paragraph into lines. Or, after you break the book into lines, any empty line signals a change of paragraph.

提交回复
热议问题