I'm kinda new to python and I'm wondering how I can turn this rot (n) encode function
def rot_encode(n):
from string import ascii_lowercase as lc, ascii_uppercase as uc
lookup = str.maketrans(lc + uc, lc[n:] + lc[:n] + uc[n:] + uc[:n])
return lambda s: s.translate(lookup)
print(rot_alpha(13)('Hello World'))
To a decode function
I don't want to use the built-in functionality of python to encode or decode, I want to recreate it.
Thanks in advance