This is a bit tedious if we want to deal with an entire message. By defining a couple of Python functions we can make life easier.
Now we can encrypt a whole string of characters at once:
and decrypt: