This is a codecademy challenge, i am trying to offset the letters in the input string in relation to the english alphabet. lets say if we enter d with an offset of 3 it should return a. What am i doing wrong ? I am new to python i started 3 days ago because of the quarantine, love it so far.
import string
a = list(string.ascii_lowercase)
word = "assa"
i = ""
j= ""
x = 0
for j in a:
for i in word:
if i == j:
x = (int(a.index(j)) - 10)
z = str(a[x])
sol = word.replace(i,z)
print(sol)
#def cipher(word):