from pycipher import PolybiusSquare print PolybiusSquare('phqgiumeaylnofdxkrcvstzwb',5,'ABCDE').encipher('helloworld') print PolybiusSquare('phqgiumeaylnofdxkrcvstzwb',5,'ABCDE').decipher('ABBCCACACCEDCCDCCACE')