diff --git a/caesar.py b/caesar.py index 016daf6..1013148 100644 --- a/caesar.py +++ b/caesar.py @@ -28,7 +28,7 @@ for char in txt_list: # loop through all of the chars index = index + in_key # shift the alphabet while( index > alen - 1 ): #cycle through the alphabet print("Alphabet cycle") - index = (index + in_key) - (alen - 1) + index = index - (alen - 1) decryp_list[charindex] = alphabet[in_alphabet][index]