Modernize Python 2 code to get ready for Python 3

This commit is contained in:
cclauss
2017-11-25 12:41:55 +01:00
parent 4e06949072
commit e31c780d94
17 changed files with 38 additions and 9 deletions

View File

@ -85,7 +85,7 @@ def decode(ciphertext, key):
plaintext = ""
# https://en.wikipedia.org/wiki/Playfair_cipher#Description
for char1, char2 in chunk(ciphertext, 2):
for char1, char2 in chunker(ciphertext, 2):
row1, col1 = divmod(table.index(char1), 5)
row2, col2 = divmod(table.index(char2), 5)