def decipher(self,string,keep_punct=False):
<EOL>if self.invkey == '<STR_LIT>':<EOL><INDENT>for i in '<STR_LIT>': <EOL><INDENT>self.invkey += self.i2a(self.key.index(i))<EOL><DEDENT><DEDENT>if not keep_punct: string = self.remove_punctuation(string)<EOL>ret = '<STR_LIT>'      <EOL>for c in string.upper():<EOL><INDENT>if c.isalpha(): ret += self.invkey[self.a2i(c)]<EOL>else: ret += c<EOL><DEDENT>return ret<EOL>
Decipher string using Simple Substitution cipher according to initialised key.

        Example::

            plaintext = SimpleSubstitution('AJPCZWRLFBDKOTYUQGENHXMIVS').decipher(ciphertext)     

        :param string: The string to decipher.
        :param keep_punct: if true, punctuation and spacing are retained. If false, it is all removed. Default is False. 
        :returns: The deciphered string.