I have a dictionary that looks like this:
Letters = {'a': 'z', 'b': 'q', 'm':'j'}
I also have a block of random text.
How do I get replace the letters in my text with the letter from the dictionary. So switch 'a' to 'z' and 'b' to 'q'.
What I've done so far is returning the wrong output and I can't think of any other way:
splitter = text.split()
res = " ".join(Letters.get(i,i) for i in text.split())
print(res)