def decode(cipher, shift):
    result = ''
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for letter in cipher:
    index = letters.index(letter)
result += letters[index - shift]
return result
print(decode('LIPPSASVPH', 4))
Changing the letters of a string