I'm sorry if this is a foolish question or a duplicate - I looked but didn't really find anything on this specific question:
I wrote a little cyphering tool for practise, now I'm working on the deciphering part and wondering, how I can use the dictionary I used as a lookuptable to revert this... I can't access the dictionary's key via its value, right?
So I thought I'd turn it around like this:
for x, y in cyphertable.items():
DEcyphertable = dict(zip(x, y))
But this doesn't seem to work. A: What am I doing wrong? and B: How else could I make each "i" in a string look up the value and replace it with the corresponding key?