Expanding from chriswelborn's code ...
''' crypt_table101.py
encrypt and decrypt using tables
'''
import string
''' make the from and to string
s_from = string.ascii_uppercase + string.ascii_lowercase
import random
q = list(s_from)
random.shuffle(q)
s_to = "".join(q)
print(s_from)
print(s_to)
'''
# strings have to be same length
# and contain all the characters
s_from = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
s_to = "GhtUJdEcnbRFLiaguOQIPTYDpwNeqWrHZjfVsBXklxyoKAvzCSmM"
trans_table_encrypt = string.maketrans(s_from, s_to)
trans_table_decrypt = string.maketrans(s_to, s_from)
text = "Meet me at four thirty PM at the dog park elm tree"
encrypted = text.translate(trans_table_encrypt)
print(encrypted)
decrypted = encrypted.translate(trans_table_decrypt)
print(decrypted)
''' my result ...
LrrA Xr NA Hlvo AjfoAm gL NA Ajr WlZ xNos rBX Aorr
Meet me at four thirty PM at the dog park elm tree
'''
More of a game!