def FtEncrypt(self,text):
        """ Encrypt a text into a list of values """
        
        self.text = text
        EncryptText = []
        characters = "abcdefghijklmnopqrstuvwxyz "

        #attempt to append my_list and update my_dict
        #using a random set of alphabet and a random made_key         
        try:
            for char in random.sample(characters,27):
                Code_Fouad_Teniou.my_list.append(char)
           
            Code_Fouad_Teniou.my_dict.update(zip(Code_Fouad_Teniou.my_key,Code_Fouad_Teniou.my_list))

            for item in text.lower():
                for i in Code_Fouad_Teniou.my_dict.items():
                    if item == i[1]:
                        EncryptText.append(i[0])
                    
            return EncryptText
        
        #Raise AttributeError if text is not a string 
        except AttributeError:
            raise AttributeError, "\n<Please re-enter your text as a 'string'"
 Encrypt a text into a list of values 
recipes/Python/576995_CodeFouadTeniou/recipe-576995.py