Why is the encrypt function outputing the memory location?
here is the code: from math import sqrt class Code(): def __init__(self, text, key, t): self.text = text self.key = key if t == "E": self.encrypt(self.text, self.key) elif t == "D": self.decrypt(self.text, self.key) def encrypt(self, text, key): words = text.split(" ") letters = [] encrypted_msg = [] for word in words: letters.append(list(word)) for list1 in letters: for letter in list1: encrypted_msg.append((ord(letter)**2) + ord(key)) return encrypted_msg def decrypt(self, msg, key): int_words = " " for number in msg: int_words += str(chr(int(sqrt(number - ord(key))))) return int_words text = input("Input message:: ") print ("........................................................") print ("encrypting message") print ("........................................................") E_message = Code(text, "w", "E") print (E_message) print ("........................................................") print ("decrypting message") print ("....................