I'm trying to make a shifted letter encoder in python but for some reason it only went through the for
loop once how can I fix this?
import string
uppercase = list(string.ascii_uppercase)
a = input("Your word: ")
def encode(str):
for i in str:
currentletterindex = uppercase.index(i)
shifted = uppercase[currentletterindex+1]
return shifted
print(encode(a))