Translation Tables In Python
Back when I was a teacher, I used to ask my students to implement a Caeser Cipher encoder/decoder. If you’re not familiar with it, it is a simple substitution cipher that replaces characters on a string by the corresponding characters from a shifted alphabet. The algorithm takes a numerical cipher n as its input (the key) and then rotates the letters in the alphabet by n characters. Then, a translation table is created by lining up the original and the rotated alphabets.