defdecryption(key, message): key = 0 - key transled = '' for symbol in message: if symbol.isalpha(): num = ord(symbol) num += key if num > ord('z'): num -= 26 elif num < ord('a'): num += 26 transled += chr(num) else: transled += symbol return transled