from pycipher import SimpleSubstitution print SimpleSubstitution('phqgiumeaylnofdxjkrcvstzwb').encipher('hello world') print SimpleSubstitution('phqgiumeaylnofdxjkrcvstzwb').decipher('EINNDTDKNG')