def Decrypt(self, textToDecrypt): # Anything other than a string input will break this location = 0 decryptedText = "" offsetIndex = 0 nextwhitespace = 0 while location < len(textToDecrypt): if offsetIndex < 9: offsetIndex += 1 elif offsetIndex == 9: offsetIndex = 0 nextwhitespace = textToDecrypt.find(" ", location) if nextwhitespace != -1: tempTextToDecrypt = textToDecrypt[location:nextwhitespace] offsetValue = encryptionList[offsetIndex] finalText = chr(int(tempTextToDecrypt) - int(offsetValue)) decryptedText += finalText if nextwhitespace < location: return decryptedText else: location = nextwhitespace + 1